|
2 | 2 |
|
3 | 3 | import itertools |
4 | 4 | import warnings |
5 | | -from typing import Callable, Optional |
| 5 | +from typing import Callable, Dict, Optional |
6 | 6 |
|
7 | 7 | import numpy as np |
8 | 8 | import pandas as pd |
@@ -86,9 +86,9 @@ def _pairwise_cramers(col_1: pd.Series, col_2: pd.Series) -> float: |
86 | 86 | return _cramers_corrected_stat(pd.crosstab(col_1, col_2), correction=True) |
87 | 87 |
|
88 | 88 |
|
89 | | -@Cramers.compute.register(Settings, pd.DataFrame, dict[str, VarDescription]) |
| 89 | +@Cramers.compute.register(Settings, pd.DataFrame, Dict[str, VarDescription]) |
90 | 90 | def pandas_cramers_compute( |
91 | | - config: Settings, df: pd.DataFrame, summary: dict[str, VarDescription] |
| 91 | + config: Settings, df: pd.DataFrame, summary: Dict[str, VarDescription] |
92 | 92 | ) -> Optional[pd.DataFrame]: |
93 | 93 | threshold = config.categorical_maximum_correlation_distinct |
94 | 94 |
|
@@ -127,9 +127,9 @@ def pandas_cramers_compute( |
127 | 127 | return correlation_matrix |
128 | 128 |
|
129 | 129 |
|
130 | | -@PhiK.compute.register(Settings, pd.DataFrame, dict[str, VarDescription]) |
| 130 | +@PhiK.compute.register(Settings, pd.DataFrame, Dict[str, VarDescription]) |
131 | 131 | def pandas_phik_compute( |
132 | | - config: Settings, df: pd.DataFrame, summary: dict[str, VarDescription] |
| 132 | + config: Settings, df: pd.DataFrame, summary: Dict[str, VarDescription] |
133 | 133 | ) -> Optional[pd.DataFrame]: |
134 | 134 | df_cols_dict = {i: list(df.columns).index(i) for i in df.columns} |
135 | 135 |
|
@@ -163,9 +163,9 @@ def pandas_phik_compute( |
163 | 163 | return correlation |
164 | 164 |
|
165 | 165 |
|
166 | | -@Auto.compute.register(Settings, pd.DataFrame, dict[str, VarDescription]) |
| 166 | +@Auto.compute.register(Settings, pd.DataFrame, Dict[str, VarDescription]) |
167 | 167 | def pandas_auto_compute( |
168 | | - config: Settings, df: pd.DataFrame, summary: dict[str, VarDescription] |
| 168 | + config: Settings, df: pd.DataFrame, summary: Dict[str, VarDescription] |
169 | 169 | ) -> Optional[pd.DataFrame]: |
170 | 170 | threshold = config.categorical_maximum_correlation_distinct |
171 | 171 | numerical_columns = [ |
|
0 commit comments