statsmodels.stats.contingency_tables.SquareTable.from_data¶
-
classmethod
SquareTable.
from_data
(data, shift_zeros=True)¶ 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 (boolean) – If True and any cell count is zero, add 0.5 to all values in the table.
Returns: Return type: A Table instance.