posit-dev / py-shiny

Shiny for Python
https://shiny.posit.co/py/
MIT License
1.32k stars 81 forks source link

Row names for render.data_frame #1775

Closed cmfield closed 5 days ago

cmfield commented 1 week ago

I don't think it's currently possible to show row names (or the index column names in pandas terms). If there's a way to do it, please let me know, otherwise I guess this is a feature request!

GiorgioMiglia commented 6 days ago

You could simply add them as the first column of the dataframe. For pandas:

df.reset_index()

Shinylive example

cmfield commented 5 days ago

This works, I suppose I can format them to look like the column headers - thanks.