dragon-ml-toolbox 20.7.0__py3-none-any.whl → 20.7.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dragon_ml_toolbox-20.7.0.dist-info → dragon_ml_toolbox-20.7.1.dist-info}/METADATA +1 -1
- {dragon_ml_toolbox-20.7.0.dist-info → dragon_ml_toolbox-20.7.1.dist-info}/RECORD +7 -7
- ml_tools/utilities/_translate.py +10 -9
- {dragon_ml_toolbox-20.7.0.dist-info → dragon_ml_toolbox-20.7.1.dist-info}/WHEEL +0 -0
- {dragon_ml_toolbox-20.7.0.dist-info → dragon_ml_toolbox-20.7.1.dist-info}/licenses/LICENSE +0 -0
- {dragon_ml_toolbox-20.7.0.dist-info → dragon_ml_toolbox-20.7.1.dist-info}/licenses/LICENSE-THIRD-PARTY.md +0 -0
- {dragon_ml_toolbox-20.7.0.dist-info → dragon_ml_toolbox-20.7.1.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
dragon_ml_toolbox-20.7.
|
|
2
|
-
dragon_ml_toolbox-20.7.
|
|
1
|
+
dragon_ml_toolbox-20.7.1.dist-info/licenses/LICENSE,sha256=L35WDmmLZNTlJvxF6Vy7Uy4SYNi6rCfWUqlTHpoRMoU,1081
|
|
2
|
+
dragon_ml_toolbox-20.7.1.dist-info/licenses/LICENSE-THIRD-PARTY.md,sha256=0-HBRMMgKuwtGy6nMJZvIn1fLxhx_ksyyVB2U_iyYZU,2818
|
|
3
3
|
ml_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
ml_tools/constants.py,sha256=3br5Rk9cL2IUo638eJuMOGdbGQaWssaUecYEvSeRBLM,3322
|
|
5
5
|
ml_tools/ETL_cleaning/__init__.py,sha256=gLRHF-qzwpqKTvbbn9chIQELeUDh_XGpBRX28j-5IqI,545
|
|
@@ -135,10 +135,10 @@ ml_tools/schema/_gui_schema.py,sha256=IVwN4THAdFrvh2TpV4SFd_zlzMX3eioF-w-qcSVTnd
|
|
|
135
135
|
ml_tools/serde/__init__.py,sha256=IDirr8i-qjUHB71hmHO6lGiODhUoOnUcXYrvb_XgrzE,292
|
|
136
136
|
ml_tools/serde/_serde.py,sha256=8QnYK8ZG21zdNaC0v63iSz2bhgwOKRKAWxTVQvMV0A8,5525
|
|
137
137
|
ml_tools/utilities/__init__.py,sha256=h4lE3SQstg-opcQj6QSKhu-HkqSbmHExsWoM9vC5D9U,1035
|
|
138
|
-
ml_tools/utilities/_translate.py,sha256=
|
|
138
|
+
ml_tools/utilities/_translate.py,sha256=U8hRPa3PmTpIf9n9yR3gBGmp_hkcsjQLwjAHSHc0WHs,10325
|
|
139
139
|
ml_tools/utilities/_utility_save_load.py,sha256=EFvFaTaHahDQWdJWZr-j7cHqRbG_Xrpc96228JhV-bs,16773
|
|
140
140
|
ml_tools/utilities/_utility_tools.py,sha256=bN0J9d1S0W5wNzNntBWqDsJcEAK7-1OgQg3X2fwXns0,6918
|
|
141
|
-
dragon_ml_toolbox-20.7.
|
|
142
|
-
dragon_ml_toolbox-20.7.
|
|
143
|
-
dragon_ml_toolbox-20.7.
|
|
144
|
-
dragon_ml_toolbox-20.7.
|
|
141
|
+
dragon_ml_toolbox-20.7.1.dist-info/METADATA,sha256=IB7aIajHgmlg0UvpBOjDfCiQWfNmM0G3NKSpiEvDlAs,7866
|
|
142
|
+
dragon_ml_toolbox-20.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
143
|
+
dragon_ml_toolbox-20.7.1.dist-info/top_level.txt,sha256=wm-oxax3ciyez6VoO4zsFd-gSok2VipYXnbg3TH9PtU,9
|
|
144
|
+
dragon_ml_toolbox-20.7.1.dist-info/RECORD,,
|
ml_tools/utilities/_translate.py
CHANGED
|
@@ -92,15 +92,16 @@ def translate_dataframe_columns(
|
|
|
92
92
|
# 3. Apply Translation
|
|
93
93
|
try:
|
|
94
94
|
if isinstance(df, pd.DataFrame):
|
|
95
|
-
|
|
95
|
+
resulting_df = df.rename(columns=translation_map)
|
|
96
96
|
elif isinstance(df, pl.DataFrame):
|
|
97
|
-
|
|
97
|
+
resulting_df = df.rename(translation_map, strict=False)
|
|
98
98
|
except Exception as e:
|
|
99
99
|
_LOGGER.error(f"Failed to rename columns: {e}")
|
|
100
100
|
raise e
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
else:
|
|
102
|
+
if verbose >= 2:
|
|
103
|
+
_LOGGER.info(f"Successfully translated {len(common_cols)} columns.")
|
|
104
|
+
return resulting_df
|
|
104
105
|
|
|
105
106
|
|
|
106
107
|
def create_translation_template(
|
|
@@ -204,10 +205,10 @@ def audit_column_translation(
|
|
|
204
205
|
coverage_pct = (len(matched) / len(cols) * 100) if len(cols) > 0 else 0.0
|
|
205
206
|
|
|
206
207
|
# 4. Report
|
|
207
|
-
report_string = f"--- 🔍 Translation Audit Report: {source_name} ---\n \
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
report_string = f"\n--- 🔍 Translation Audit Report: {source_name} ---\n \
|
|
209
|
+
Direction: {direction}\n \
|
|
210
|
+
Total Columns: {len(cols)}\n \
|
|
211
|
+
Map Coverage: {coverage_pct:.1f}%\n"
|
|
211
212
|
|
|
212
213
|
if matched:
|
|
213
214
|
report_string += f"\n✅ Will Translate: {len(matched)} columns"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|