PrettyPandas icon indicating copy to clipboard operation
PrettyPandas copied to clipboard

API Feature Requests (v.0.0.3)

Open HHammond opened this issue 9 years ago • 5 comments
trafficstars

  • set_font
  • set_background - change cell background colours
  • set_alternating - apply alternating even-odd colours
  • set_hover - apply hover effects
  • set_cell_height - set minimum cell height
  • set_cell_width - set minimum cell width
  • describe - add stats similar to DataFrame.describe()

HHammond avatar Jan 20 '16 17:01 HHammond

+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!

alimanfoo avatar Jan 21 '16 19:01 alimanfoo

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 avatar Jan 21 '16 19:01 HHammond

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

HHammond avatar Jan 21 '16 19:01 HHammond

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

On Thursday, 21 January 2016, Henry Hammond [email protected] 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: [email protected] [email protected] Tel: +44 (0)1865 287721

alimanfoo avatar Jan 21 '16 21:01 alimanfoo

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

pybokeh avatar Mar 26 '16 12:03 pybokeh