HHammond / PrettyPandas

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

Add Sparkline API #30

Closed HHammond closed 6 years ago

HHammond commented 8 years ago

Implements Sparkline API from https://github.com/HHammond/PrettyPandas/issues/23

I thought this would be a fun weekend project.

Examples:

screen shot 2016-01-23 at 2 36 15 pm screen shot 2016-01-23 at 2 36 03 pm
HHammond commented 8 years ago

Here's another example of what can be made with this API. Currently you can only work with the entire dataframe rows or columns. There's another issue to refactor the summary API to allow subsetting which will fill in the gaps and allow grabbing data from an external dataframe.

screen shot 2016-01-24 at 9 35 22 am
HHammond commented 8 years ago

Tests are probably failing due to changes added by the .hide method and a change to how styles are applied to columns.

Basically the existing behaviour is to mark the n^th column as styled. When hiding columns comes into the mix hiding the n^th-last column is a better approach to styling.