gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
34.11k stars 2.59k forks source link

Add column explainers to dataframes #9911

Open KennethEnevoldsen opened 2 weeks ago

KennethEnevoldsen commented 2 weeks ago

Is your feature request related to a problem? Please describe.

Often when you display a dataframe you want to add some additional information describing the columns e.g. as shown in this picture:

Screenshot 2024-11-06 at 20 46 17

Describe the solution you'd like

A solution could look like so:

# define some dataframe
df = ...
styler = df.style.highlight_max(...)

# pass to gradio
gr.DataFrame(styler, column_explainers={"population": "Number of inhabitants in millions", ...})

Additional context

A place where we plan to use this is in the MTEB leaderboard. I can imagine it is useful for many other leaderboard applications.

hannahblair commented 1 week ago

This is a nice idea!