Closed alistairewj closed 6 years ago
Column order at the moment depends on the group names when using groupby.
groupby
url="https://raw.githubusercontent.com/tompollard/data/master/primary-biliary-cirrhosis/pbc.csv" data_pbc=pd.read_csv(url) table = TableOne(data_pbc, columns=columns, groupby=groupby, pval=True, pval_adjust='bonferroni') table
gives:
... while
url="https://raw.githubusercontent.com/tompollard/data/master/primary-biliary-cirrhosis/pbc.csv" data_pbc=pd.read_csv(url) df = data_pbc.copy() df.loc[df['sex']=='f', 'sex'] = 'q' table = TableOne(df, columns=columns, groupby=groupby, pval=True, pval_adjust='bonferroni') table
Column order at the moment depends on the group names when using
groupby
.gives:
... while
gives: