@classmethod
    def from_data(cls, data, shift_zeros=True):

        if isinstance(data, pd.DataFrame):
            table = pd.crosstab(data.iloc[:, 0], data.iloc[:, 1])
        else:
            table = pd.crosstab(data[:, 0], data[:, 1])
        return cls(table, shift_zeros)
DerviedAttributes added to a dataset in a collection
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/stats/contingency_tables.py/Table2x2.from_data--crossover with--dataset/ETHPy150Open glue-viz/glue/glue/core/tests/test_data_collection.py/TestDataCollection.test_catch_data_add_component_message