|
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 |
@@ -89,9 +89,9 @@ def _pairwise_cramers(col_1: pd.Series, col_2: pd.Series) -> float: |
89 | 89 | return _cramers_corrected_stat(pd.crosstab(col_1, col_2), correction=True) |
90 | 90 |
|
91 | 91 |
|
92 | | -@Cramers.compute.register(Settings, pd.DataFrame, dict[str, VarDescription]) |
| 92 | +@Cramers.compute.register(Settings, pd.DataFrame, Dict[str, VarDescription]) |
93 | 93 | def pandas_cramers_compute( |
94 | | - config: Settings, df: pd.DataFrame, summary: dict[str, VarDescription] |
| 94 | + config: Settings, df: pd.DataFrame, summary: Dict[str, VarDescription] |
95 | 95 | ) -> Optional[pd.DataFrame]: |
96 | 96 | threshold = config.categorical_maximum_correlation_distinct |
97 | 97 |
|
@@ -130,9 +130,9 @@ def pandas_cramers_compute( |
130 | 130 | return correlation_matrix |
131 | 131 |
|
132 | 132 |
|
133 | | -@PhiK.compute.register(Settings, pd.DataFrame, dict[str, VarDescription]) |
| 133 | +@PhiK.compute.register(Settings, pd.DataFrame, Dict[str, VarDescription]) |
134 | 134 | def pandas_phik_compute( |
135 | | - config: Settings, df: pd.DataFrame, summary: dict[str, VarDescription] |
| 135 | + config: Settings, df: pd.DataFrame, summary: Dict[str, VarDescription] |
136 | 136 | ) -> Optional[pd.DataFrame]: |
137 | 137 | df_cols_dict = {i: list(df.columns).index(i) for i in df.columns} |
138 | 138 |
|
@@ -166,9 +166,9 @@ def pandas_phik_compute( |
166 | 166 | return correlation |
167 | 167 |
|
168 | 168 |
|
169 | | -@Auto.compute.register(Settings, pd.DataFrame, dict[str, VarDescription]) |
| 169 | +@Auto.compute.register(Settings, pd.DataFrame, Dict[str, VarDescription]) |
170 | 170 | def pandas_auto_compute( |
171 | | - config: Settings, df: pd.DataFrame, summary: dict[str, VarDescription] |
| 171 | + config: Settings, df: pd.DataFrame, summary: Dict[str, VarDescription] |
172 | 172 | ) -> Optional[pd.DataFrame]: |
173 | 173 | threshold = config.categorical_maximum_correlation_distinct |
174 | 174 | numerical_columns = [ |
|
0 commit comments