statsmodels.stats.contingency_tables.Table.from_data¶ classmethod Table.from_data(data, shift_zeros=True)[source]¶ Construct a Table object from data. Parameters:¶ data : array_like¶The raw data, from which a contingency table is constructed using the first two columns. shift_zeros : bool¶If True and any cell count is zero, add 0.5 to all values in the table. Return type:¶ A Table instance.