qgrid icon indicating copy to clipboard operation
qgrid copied to clipboard

How to apply pandas styles to qgrid dataframe

Open javierorozco opened this issue 8 years ago • 9 comments

Is it possible to apply pandas styles to qqgrid dataframes? Something like described here http://pandas.pydata.org/pandas-docs/stable/style.html or simply like this df.style.set_caption('Colormaps, with a caption.').background_gradient(cmap='Spectral')

javierorozco avatar Oct 16 '17 11:10 javierorozco

Hi @javierorozco, it's not currently possible, but I've heard a similar request before: https://github.com/quantopian/qgrid/issues/28 so it seems like it might be worth adding. I'll have to look into it next time I scope out a qgrid project.

Thanks for the question.

TimShawver avatar Oct 16 '17 18:10 TimShawver

Will this be introduced in the future, would be really usefull.

jstewart37 avatar Mar 22 '18 16:03 jstewart37

I have actually been looking for this for the longest time. Currently, I can only apply styles to the widget.get_changed_df(), but after like 2 weeks of attempting to figure out how to do styling to the qgrid itself, I could not find anything related nor figure out some hacky solution to it.

image

Desimor avatar Jun 15 '18 12:06 Desimor

Thanks for the feedback...yea this would be really cool (and sounds like a lot of people want it) but I haven't had time to figure out how to do it yet. I recently came up with a strategy for applying styles that make the cells look merged for MultiIndex dataframe (see https://github.com/quantopian/qgrid/pull/203) so hopefully I'll be able to use a similar strategy to tackle this problem. Not sure when I'll get to it though.

TimShawver avatar Jun 15 '18 13:06 TimShawver

Lol. It just occurred to me that my Dark Reader made the tables look black and darkened the picture, but they are technically white and the colors are brighter on a normal monitor. Anyway, I'm glad it's something everyone wants. I can't wait to see it implemented. Until then, I can highlight the dataframe that it produces using pandas until the actual qgrid widget can display the highlighting itself.

Just a few notes: -- I'll be adding a heat-map to the individual columns. -- I also need to put a standard deviation highlight to any data based on whatever calculation I used to determine it's deviation. So for instance, the red highlighted cells are are based on any number that is over 80, which means I'll be applying some logic to the column/series.

Desimor avatar Jun 15 '18 15:06 Desimor

any progress on this one? i could also use this feature.

CFGrote avatar Apr 04 '19 11:04 CFGrote

Just following-up here as I was about to post in another thread. Any new update on that matter? would be awesome to use pd.style.format

alainwal avatar Apr 02 '20 14:04 alainwal

How to apply pandas styles to qgrid dataframe ?

bajizhh avatar Jul 27 '20 02:07 bajizhh

any progress on this one? i could also use this feature.

bajizhh avatar Jul 27 '20 02:07 bajizhh