I have a column called Observation in my dataframe which contains a value eg “William%R & Stochastic are Oversold. RSI close to Oversold.”
However, when it is displayed in streamlit I can see only see the first 23 characters of the value. Anything above 23 is truncated and displayed as triple dots “…”
I used
“st.dataframe(df)” to display my dataframe in streamlit.
I even tried using st.write(df) also but it gives me the same result.
I have attached the screenshot of the dataframe output in both excel and streamlit.
hi, you can use streamlit-aggrid module to show your dataframe on web page, it is very simple and friendly
install method:
pip install streamlit-aggrid
usage:
from st_aggrid import AgGrid
import streamlit as st
import pandas as pd
dataframe=pd.read_excel(“your excel file name”)
AgGrid(dataframe, height=500, fit_columns_on_grid_load=True)
Thanks BeyondMyself, Aggrid is awesome. It gives me options to resize column and also enable filter without adding any extra code. I am going to love this.
But one thing I noticed is that, I have now lost the expander which used to appear on the right side of the table output. I am sure there must be a way to achieve this in AgGrid. I will have a go and read the documenation to try different features. Thanks for your support.