Closed scls19fr closed 6 years ago
Hello,
https://github.com/HHammond/PrettyPandas/blob/master/Readme.md provides an example but it should simply be copy/pastable
import pandas as pd from pandas.compat import StringIO dat = """A;B;C;D 10;58.0;0.07156;0.39343 2.51;64.0;1.21872;0.33958 5;56.0;1.38399;0.26289 2.51;47.0;0.45284;1.47185 5;46.0;1.19918;2.08354""" df = pd.read_csv(StringIO(dat), sep=";") df from prettypandas import PrettyPandas (PrettyPandas(df, precision=0) .as_percent(subset=['C', 'D'], precision=3) .as_money(subset='A') .average() .total() )
Kind regards
The examples are now copy and paste-able, except for the actual dataframe itself which I found too difficult to get the CSS right on the readthedocs page.
Hello,
https://github.com/HHammond/PrettyPandas/blob/master/Readme.md provides an example but it should simply be copy/pastable
Kind regards