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

Column names of gr.Dataframe disappear when the rows are empty #10474

Closed
1 task done
hysts opened this issue Jan 31, 2025 · 0 comments · Fixed by #10476
Closed
1 task done

Column names of gr.Dataframe disappear when the rows are empty #10474

hysts opened this issue Jan 31, 2025 · 0 comments · Fixed by #10476
Labels
bug Something isn't working Regression Bugs did not exist in previous versions of Gradio

Comments

@hysts
Copy link
Collaborator

hysts commented Jan 31, 2025

Describe the bug

With gradio==5.12.0, when passing a pd.DataFrame with only column names and no rows to gr.Dataframe, the column names were preserved, but with gradio>=5.13.0, the column names disappear when there're no rows.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr
import pandas as pd

with gr.Blocks() as demo:
    gr.Dataframe(value=pd.DataFrame(columns=["a", "b"]))
demo.launch()

Screenshot

gradio==5.12.0

gradio==5.14.0

Logs

System Info

gradio==5.14.0

Severity

I can work around it

@hysts hysts added the bug Something isn't working label Jan 31, 2025
@abidlabs abidlabs added the Regression Bugs did not exist in previous versions of Gradio label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Regression Bugs did not exist in previous versions of Gradio
Projects
None yet
2 participants