Closed tompollard closed 4 years ago
Sure!, please find it below:
Reference: Subramaniam, B., Lerner, A., Novack, V., Khabbaz, K., Paryente-Wiesmann, M., Hess, P., & Talmor, D. (2014). Increased glycemic variability in patients with elevated preoperative HbA1C predicts adverse outcomes following coronary artery bypass grafting surgery. Anesthesia & Analgesia, 118(2), 277-287.
@theonesp, sorry it took a bit of time to get to this! Version 0.7.1 now includes the overall column by default:
path = "https://raw.githubusercontent.com/tompollard/tableone/master/data/pn2012_demo.csv"
df = pd.read_csv(path)
cols = ["Age", "SysABP", "Height", "Weight", "ICU", "MechVent", "LOS", "death"]
categorical=["ICU", "MechVent", "death"]
strata = "MechVent"
t = TableOne(df, categorical=categorical, label_suffix=True, groupby=strata,
pval=True, smd=True, overall=True)
t
Consider adding an option to display an overall/total column when groupby is used (suggested by @theonesp). Miguel, you showed me an example of a paper that did this nicely. Please could you post a screenshot of the table here?