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.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.