[Feature Request] Show index and enable styling in data table #5486
cod3licious
started this conversation in
General
Replies: 1 comment
-
|
The feature is supported in Ag-grid, which is a component in the Reflex Enterprise package |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
With other frameworks (e.g., streamlit) it is possible to show pandas DataFrames with their style attributes, for example, to color the individual cells based on the values contained in them to highlight high or low values.
The
rx.data_tableunfortunately does not seem to support pandas Styler objects. One workaround is to use the pandasto_html()function and embed the html directly, however, then of course you're losing the ability to sort, pagination, etc. and the table looks quite ugly by default.Code example:
This gives:

Ideally, I'd want to use reflex's
data_tablebut with the same styling as the html table below it.Additionally, it would also be great if
data_tablewould support showing the index of the dataframe, since sometimes this contains actual names instead of just row indices.Beta Was this translation helpful? Give feedback.
All reactions