HHammond / PrettyPandas

A Pandas Styler class for making beautiful tables
http://prettypandas.readthedocs.org/
MIT License
415 stars 23 forks source link

API Feature Requests (v.0.0.3) #18

Open HHammond opened 8 years ago

HHammond commented 8 years ago
alimanfoo commented 8 years ago

+1 for setting cell background color based on value. I'm sure you've thought of these already, but some use cases: (1) set colour based on mapping from (categorical) values to colours; (2) set colour using colour map, with user able to provide vmin, vmax, cmap and possibly normalize arguments to control value to colour transformation; (3) set colour using threshold on value, eg, red if > 5. Would be amazing if prettypandas could support these!

HHammond commented 8 years ago

There already is colour-map support and min, max background support in the Pandas API http://pandas.pydata.org/pandas-docs/stable/style.html#Building-Styles. They have some neat functionality implemented. Since PrettyPandas subclasses pandas.core.Styler we get all that stuff for free.

I do think if a negative value colour indicator isn't built into pandas core then it definitely belongs here.

HHammond commented 8 years ago

Also I think I should include those examples in the documentation so that people are aware

alimanfoo commented 8 years ago

Wow, I didn't know about that, perfect! Good idea to include an example in prettypandas docs.

On Thursday, 21 January 2016, Henry Hammond notifications@github.com wrote:

There already is colour-map support and min, max background support in the Pandas API http://pandas.pydata.org/pandas-docs/stable/style.html#Building-Styles. They have some neat functionality implemented. Since PrettyPandas subclasses pandas.core.Styler we get all that stuff for free.

I do think if a negative value colour indicator isn't built into pandas core then it definitely belongs here.

— Reply to this email directly or view it on GitHub https://github.com/HHammond/PrettyPandas/issues/18#issuecomment-173682083 .

Alistair Miles Head of Epidemiological Informatics Centre for Genomics and Global Health http://cggh.org The Wellcome Trust Centre for Human Genetics Roosevelt Drive Oxford OX3 7BN United Kingdom Web: http://purl.org/net/aliman Email: alimanfoo@googlemail.com alimanfoo@gmail.com Tel: +44 (0)1865 287721

pybokeh commented 8 years ago

Please consider using axis='columns', axis='index' instead of axis=0, axis=1 to win over people who don't have numpy background. Pandas api supports this as well. See:

https://github.com/pydata/pandas/issues/9658