-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include a pandas dataframe element #1350
Comments
Unfortunately you are not the first to have requested this feature. await cl.Message(
content="Data Table",
elements=[cl.Text(content=df.to_markdown(index=False), display="inline")],
).send() I also believe native support for DataFrames should be added, just like in Streamlit, because Markdown tables don't look half as good and aren't interactive.
|
I'm currently working on a draft pull request to implement this feature. The implementation will utilize the MUI X Data Grid component. I'll update this issue with more details and a link to the PR once it's available for feedback. |
Looks great! |
Can I check if users can interact with the data frame like in streamlit - if they click the column name does it sort the data frame? |
Yes, users can interact with the data frame similarly to how they would in Streamlit, including clicking the column name to sort it. You can explore additional interactive features and functionalities in this library here. |
Is your feature request related to a problem? Please describe.
Chainlit offers many elements that can be tagged to a message. I would like to suggest loading a pandas dataframe element because the response of LLMs can be made more neat with a table.
Describe the solution you'd like
Inclusion of a pandas dataframe element.
Describe alternatives you've considered
Streamlit has this feature https://docs.streamlit.io/develop/api-reference/data/st.dataframe
It would be great if chainlit has it too.
The text was updated successfully, but these errors were encountered: