HHammond / PrettyPandas

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

dataframes from pd.crosstab() are missing a row once prettified #41

Closed TristanBoudreault closed 6 years ago

TristanBoudreault commented 8 years ago

Screenshot: https://puu.sh/rPAgQ/e17239be96.png

I have this csv file: crosstab_bug.txt

when I execute the following commands in a notebook the False row of has_no_http is missing

import pandas as pd
from prettypandas import PrettyPandas
df = pd.read_csv('crosstab_bug.txt')
crosstab_df = pd.crosstab(df.has_no_http, df.error, aggfunc='count')
PrettyPandas(crosstab_df)
HHammond commented 6 years ago

I can't reproduce the issue anymore, if you can reproduce it I'll reopen this issue, but given the changes to the API I think we should be safe.