tableone icon indicating copy to clipboard operation
tableone copied to clipboard

Remarks = False not suppressing warnings under the table

Open Dekermanjian opened this issue 3 years ago • 1 comments

Hi when setting the argument remarks = False in TableOne() I still get the remarks below the table.

Dekermanjian avatar Nov 15 '20 19:11 Dekermanjian

@Dekermanjian please could you check that you are using the latest version of the package?

import tableone
print(tableone.__version__)

# 0.7.9

If you are using an earlier version, you should be able to upgrade with one of the following commands (depending on whether you are using conda or pip).

# pip
pip install tableone --upgrade

# conda
conda update tableone

In version 0.7.9, you should be able to switch on/off individual checks. e.g.

# Run Tukey's test for far outliers. If variables are found to
# have far outliers, a remark will be added below the Table 1.
# (default: False)

tukey_test = True

# normal_test : bool, optional
# Test the null hypothesis that a sample come from a normal distribution.
# Uses scipy.stats.normaltest. If variables are found to have non-normal
# distributions, a remark will be added below the Table 1.
# (default: False)

normal_test = True

# dip_test : bool, optional
# Run Hartigan's Dip Test for multimodality. If variables are found to
# have multimodal distributions, a remark will be added below the Table 1.
# (default: False)

dip_test = True

Example with tukey_test, normal_test, dip_test

import pandas as pd
from tableone import load_dataset, TableOne

data = tableone.load_dataset('rhc')
data = load_dataset('pn2012')

table1 = TableOne(data, dip_test=True, normal_test=True, tukey_test=True)

Screen Shot 2020-12-30 at 13 59 49

tompollard avatar Dec 30 '20 19:12 tompollard