Skip to content
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

How to show Pandas DataFrame in Chainlit? #665

Closed
daviddwlee84 opened this issue Jan 12, 2024 · 2 comments
Closed

How to show Pandas DataFrame in Chainlit? #665

daviddwlee84 opened this issue Jan 12, 2024 · 2 comments

Comments

@daviddwlee84
Copy link

Hi, I am new to Chainlit.

I am wondering if it is possible to render Pandas DataFrame similar to what Streamlit does

Attempts:

I haven't found DataFrame-related Element in the API Reference document:

Text
Image
File
PDF viewer
Audio
Video
Avatar
Plotly
Pyplot
TaskList

And I found the demo video was able to render DataFrame (but haven't found the source code yet)

intro.mp4

Directly returning DataFrame or using df.to_html() at a @cl.step function didn't do the trick.

@willydouhard
Copy link
Collaborator

Chainlit support markdown so you can use markdown tables. Here is an example to convert a DF to a markdown table

@desertproject
Copy link
Contributor

I believe #1373 is on the way to implement this feature. Hopefully, it will be available soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants