junshan-kit 2.3.2__py2.py3-none-any.whl → 2.3.4__py2.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.
junshan_kit/DataProcessor.py
CHANGED
@@ -18,7 +18,7 @@ class CSV_TO_Pandas:
|
|
18
18
|
drop_cols: list,
|
19
19
|
label_col: str,
|
20
20
|
label_map: dict,
|
21
|
-
|
21
|
+
title_name: str,
|
22
22
|
user_one_hot_cols = [],
|
23
23
|
print_info=False,
|
24
24
|
Standard = False
|
@@ -106,7 +106,7 @@ class CSV_TO_Pandas:
|
|
106
106
|
|
107
107
|
# Step 6: Print dataset information
|
108
108
|
print("\n" + "=" * 80)
|
109
|
-
print(f"{f'{
|
109
|
+
print(f"{f'{title_name} - Info':^70}")
|
110
110
|
print("=" * 80)
|
111
111
|
print(f"{'Original size:':<40} {m_original} rows x {n_original} cols")
|
112
112
|
print(
|
junshan_kit/DataSets.py
CHANGED
@@ -36,6 +36,9 @@ def _download_data(data_name):
|
|
36
36
|
else:
|
37
37
|
print("❌ Invalid choice. Please enter 1 or 2.\n")
|
38
38
|
|
39
|
+
# unzip file
|
40
|
+
junshan_kit.kit.unzip_file(f'./exp_data/{data_name}/{data_name}.zip', f'./exp_data/{data_name}')
|
41
|
+
|
39
42
|
def _export_csv(df, data_name):
|
40
43
|
path = f'./data_trans_fea/{data_name}/'
|
41
44
|
os.makedirs(path, exist_ok=True)
|
@@ -49,10 +52,10 @@ def _run(csv_path, data_name, drop_cols, label_col, label_map, print_info, user_
|
|
49
52
|
print(f"Please download the data.")
|
50
53
|
print(csv_path)
|
51
54
|
_download_data(data_name)
|
52
|
-
junshan_kit.kit.unzip_file(f'./exp_data/{data_name}/{data_name}.zip', f'./exp_data/{data_name}')
|
55
|
+
# junshan_kit.kit.unzip_file(f'./exp_data/{data_name}/{data_name}.zip', f'./exp_data/{data_name}')
|
53
56
|
|
54
57
|
cleaner = junshan_kit.DataProcessor.CSV_TO_Pandas()
|
55
|
-
df = cleaner.preprocess_dataset(csv_path, drop_cols, label_col, label_map, data_name,user_one_hot_cols, print_info=print_info)
|
58
|
+
df = cleaner.preprocess_dataset(csv_path, drop_cols, label_col, label_map, data_name, user_one_hot_cols, print_info=print_info)
|
56
59
|
|
57
60
|
if export_csv:
|
58
61
|
_export_csv(df, data_name)
|
@@ -169,6 +172,13 @@ def TamilNadu_weather_2020_2025(data_name = "TN Weather 2020-2025", print_info =
|
|
169
172
|
csv_path = f'./exp_data/{data_name}/TNweather_1.8M.csv'
|
170
173
|
label_col = 'rain_tomorrow'
|
171
174
|
label_map = {0: -1, 1: 1}
|
175
|
+
|
176
|
+
if not os.path.exists(csv_path):
|
177
|
+
print('\n' + '*'*60)
|
178
|
+
print(f"Please download the data.")
|
179
|
+
print(csv_path)
|
180
|
+
_download_data(data_name)
|
181
|
+
# junshan_kit.kit.unzip_file(f'./exp_data/{data_name}/{data_name}.zip', f'./exp_data/{data_name}')
|
172
182
|
|
173
183
|
# Step 0: Load the dataset
|
174
184
|
df = pd.read_csv(csv_path)
|
@@ -0,0 +1,7 @@
|
|
1
|
+
junshan_kit/DataProcessor.py,sha256=E9EDF6XBNNOTuEhSON_jnId-iKgf4QG3szB-goeXECA,4968
|
2
|
+
junshan_kit/DataSets.py,sha256=L3D0eBCKHWqpy3qXZvWQP_yKaNzWyj5W1_OLS736xjg,8972
|
3
|
+
junshan_kit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
+
junshan_kit/kit.py,sha256=tB1TpW9hW1EweK1RQwHOdUo7uG1QU4vSeyR0fdaSydo,9569
|
5
|
+
junshan_kit-2.3.4.dist-info/METADATA,sha256=Mz0Rw0l0PUVvFwT8jqtudWcYFHhoScgU5qa2Kxfg5AQ,329
|
6
|
+
junshan_kit-2.3.4.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
|
7
|
+
junshan_kit-2.3.4.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
junshan_kit/DataProcessor.py,sha256=YIZMy2gnqnT8n9MMT-q7WtRB1bbA4ITwPxNBEasAnLQ,4966
|
2
|
-
junshan_kit/DataSets.py,sha256=qN4lTVaUsKlu4b8tkZ3aMgHg9lyZTQJlYsgc0uLwUys,8570
|
3
|
-
junshan_kit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
junshan_kit/kit.py,sha256=tB1TpW9hW1EweK1RQwHOdUo7uG1QU4vSeyR0fdaSydo,9569
|
5
|
-
junshan_kit-2.3.2.dist-info/METADATA,sha256=OcuB7peGzVOuC0KIcohSPiCBdAs9BZ1mpZjX4ySSKpk,329
|
6
|
-
junshan_kit-2.3.2.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
|
7
|
-
junshan_kit-2.3.2.dist-info/RECORD,,
|
File without changes
|