tableone: An open source Python package for producing summary statistics for research papers

Abstract Objectives In quantitative research, understanding basic parameters of the study population is key for interpretation of the results. As a result, it is typical for the first table (“Table 1”) of a research paper to include summary statistics for the study data. Our objectives are 2-fold. First, we seek to provide a simple, reproducible method for providing summary statistics for research papers in the Python programming language. Second, we seek to use the package to improve the quality of summary statistics reported in research papers. Materials and Methods The tableone package is developed following good practice guidelines for scientific computing and all code is made available under a permissive MIT License. A testing framework runs on a continuous integration server, helping to maintain code stability. Issues are tracked openly and public contributions are encouraged. Results The tableone software package automatically compiles summary statistics into publishable formats such as CSV, HTML, and LaTeX. An executable Jupyter Notebook demonstrates application of the package to a subset of data from the MIMIC-III database. Tests such as Tukey’s rule for outlier detection and Hartigan’s Dip Test for modality are computed to highlight potential issues in summarizing the data. Discussion and Conclusion We present open source software for researchers to facilitate carrying out reproducible studies in Python, an increasingly popular language in scientific research. The toolkit is intended to mature over time with community feedback and input. Development of a common tool for summarizing data may help to promote good practice when used as a supplement to existing guidelines and recommendations. We encourage use of tableone alongside other methods of descriptive statistics and, in particular, visualization to ensure appropriate data handling. We also suggest seeking guidance from a statistician when using tableone for a research study, especially prior to submitting the study for publication.

[1]  David Moher,et al.  CONSORT 2010 Statement: Updated Guidelines for Reporting Parallel Group Randomised Trials , 2010, PLoS medicine.

[2]  Y. Palesch Some Common Misperceptions About P Values , 2014, Stroke.

[3]  Peter Szolovits,et al.  MIMIC-III, a freely accessible critical care database , 2016, Scientific Data.

[4]  Roger G. Mark,et al.  Reproducibility in critical care: a mortality prediction case study , 2017, MLHC.

[5]  Z. Šidák Rectangular Confidence Regions for the Means of Multivariate Normal Distributions , 1967 .

[6]  J M Yancey,et al.  Ten rules for reading clinical research reports. , 1996, American journal of orthodontics and dentofacial orthopedics : official publication of the American Association of Orthodontists, its constituent societies, and the American Board of Orthodontics.

[7]  G. Murray,et al.  Statistical aspects of research methodology , 1991, The British journal of surgery.

[8]  Marc E. Lippman Instructions for Authors , 2004, Breast Cancer Research and Treatment.

[9]  B. Granger Ipython: a System for Interactive Scientific Computing Python: an Open and General- Purpose Environment , 2007 .

[10]  et al.,et al.  Jupyter Notebooks - a publishing format for reproducible computational workflows , 2016, ELPUB.

[11]  Douglas G Altman,et al.  Basic statistical reporting for articles published in biomedical journals: the "Statistical Analyses and Methods in the Published Literature" or the SAMPL Guidelines. , 2015, International journal of nursing studies.

[12]  Skipper Seabold,et al.  Statsmodels: Econometric and Statistical Modeling with Python , 2010, SciPy.

[13]  S. Holm A Simple Sequentially Rejective Multiple Test Procedure , 1979 .

[14]  Eric Jones,et al.  SciPy: Open Source Scientific Tools for Python , 2001 .

[15]  M. Ragan-Kelley,et al.  The Jupyter/IPython architecture: a unified view of computational research, from interactive exploration to communication and publication. , 2014 .

[16]  Y. Benjamini,et al.  Controlling the false discovery rate: a practical and powerful approach to multiple testing , 1995 .

[17]  J. Hartigan,et al.  The Dip Test of Unimodality , 1985 .

[18]  Douglas G. Altman,et al.  Statistical reviewing policies of medical journals , 1998, Journal of General Internal Medicine.

[19]  Gaël Varoquaux,et al.  The NumPy Array: A Structure for Efficient Numerical Computation , 2011, Computing in Science & Engineering.

[20]  N. Black CONSORT , 1996, The Lancet.

[21]  Y. B. Wah,et al.  Power comparisons of Shapiro-Wilk , Kolmogorov-Smirnov , Lilliefors and Anderson-Darling tests , 2011 .

[22]  S. Glantz Biostatistics: how to detect, correct and prevent errors in the medical literature. , 1980, Circulation.

[23]  Lex Nederbragt,et al.  Good enough practices in scientific computing , 2016, PLoS Comput. Biol..

[24]  Jeffrey M. Perkel,et al.  Programming: Pick up Python , 2015, Nature.

[25]  Wes McKinney,et al.  Python for Data Analysis , 2012 .

[26]  Wes McKinney,et al.  pandas: a Foundational Python Library for Data Analysis and Statistics , 2011 .

[27]  Trish Groves,et al.  Enhancing the quality and transparency of health research , 2008, BMJ : British Medical Journal.

[28]  Leo A. Celi,et al.  The MIMIC Code Repository: enabling reproducibility in critical care research , 2017, J. Am. Medical Informatics Assoc..

[29]  Brian E. Granger,et al.  IPython: A System for Interactive Scientific Computing , 2007, Computing in Science & Engineering.

[30]  J. Shaffer Multiple Hypothesis Testing , 1995 .