rgwfuncs 0.0.60__py3-none-any.whl → 0.0.62__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.
- rgwfuncs/df_lib.py +7 -15
- {rgwfuncs-0.0.60.dist-info → rgwfuncs-0.0.62.dist-info}/METADATA +1 -1
- {rgwfuncs-0.0.60.dist-info → rgwfuncs-0.0.62.dist-info}/RECORD +7 -7
- {rgwfuncs-0.0.60.dist-info → rgwfuncs-0.0.62.dist-info}/LICENSE +0 -0
- {rgwfuncs-0.0.60.dist-info → rgwfuncs-0.0.62.dist-info}/WHEEL +0 -0
- {rgwfuncs-0.0.60.dist-info → rgwfuncs-0.0.62.dist-info}/entry_points.txt +0 -0
- {rgwfuncs-0.0.60.dist-info → rgwfuncs-0.0.62.dist-info}/top_level.txt +0 -0
rgwfuncs/df_lib.py
CHANGED
@@ -503,8 +503,7 @@ def load_data_from_path(file_path: str) -> pd.DataFrame:
|
|
503
503
|
df = pd.read_hdf(file_path, key=key)
|
504
504
|
break
|
505
505
|
else:
|
506
|
-
print(
|
507
|
-
f"Key '{key}' is not in the available keys.")
|
506
|
+
print(f"Key '{key}' is not in the available keys.")
|
508
507
|
return df
|
509
508
|
|
510
509
|
# Ensure the file path is absolute
|
@@ -826,8 +825,7 @@ def print_dataframe(df: pd.DataFrame, source: Optional[str] = None) -> None:
|
|
826
825
|
"""
|
827
826
|
if df is not None:
|
828
827
|
print(df)
|
829
|
-
columns_with_types = [
|
830
|
-
f"{col} ({df[col].dtypes})" for col in df.columns]
|
828
|
+
columns_with_types = [f"{col} ({df[col].dtypes})" for col in df.columns]
|
831
829
|
print("Columns:", columns_with_types)
|
832
830
|
if source:
|
833
831
|
print(f"Source: {source}")
|
@@ -891,8 +889,7 @@ def send_dataframe_via_telegram(
|
|
891
889
|
'caption': message or ''}
|
892
890
|
files = {'document': file}
|
893
891
|
response = requests.post(
|
894
|
-
f"https://api.telegram.org/bot{
|
895
|
-
bot_config['bot_token']}/sendDocument",
|
892
|
+
f"https://api.telegram.org/bot{bot_config['bot_token']}/sendDocument",
|
896
893
|
data=payload,
|
897
894
|
files=files)
|
898
895
|
if remove_after_send and os.path.exists(file_name):
|
@@ -1001,8 +998,7 @@ def send_data_to_email(
|
|
1001
998
|
encoders.encode_base64(part)
|
1002
999
|
part.add_header(
|
1003
1000
|
'Content-Disposition',
|
1004
|
-
f'attachment; filename={
|
1005
|
-
os.path.basename(tmp_file_name)}')
|
1001
|
+
f'attachment; filename={os.path.basename(tmp_file_name)}')
|
1006
1002
|
message.attach(part)
|
1007
1003
|
|
1008
1004
|
if remove_after_send and os.path.exists(tmp_file_name):
|
@@ -1271,10 +1267,8 @@ def append_percentile_classification_column(
|
|
1271
1267
|
|
1272
1268
|
if has_decimals:
|
1273
1269
|
percentiles_list = [float(p) for p in percentiles_list]
|
1274
|
-
max_decimal_length = max(
|
1275
|
-
|
1276
|
-
max_integer_length = max(len(str(int(float(p))))
|
1277
|
-
for p in percentiles_list)
|
1270
|
+
max_decimal_length = max(len(str(p).split('.')[1]) for p in percentiles_list if '.' in str(p))
|
1271
|
+
max_integer_length = max(len(str(int(float(p)))) for p in percentiles_list)
|
1278
1272
|
|
1279
1273
|
labels = []
|
1280
1274
|
|
@@ -1641,9 +1635,7 @@ def print_n_frequency_cascading(
|
|
1641
1635
|
if len(columns) > 1:
|
1642
1636
|
sub_report = generate_cascade_report(
|
1643
1637
|
filtered_df, columns[1:], limit, order_by)
|
1644
|
-
report[value] = {
|
1645
|
-
"count": str(count), f"sub_distribution({
|
1646
|
-
columns[1]})": sub_report if sub_report else {}}
|
1638
|
+
report[value] = {"count": str(count), f"sub_distribution({columns[1]})": sub_report if sub_report else {}}
|
1647
1639
|
else:
|
1648
1640
|
report[value] = {"count": str(count)}
|
1649
1641
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
rgwfuncs/__init__.py,sha256=-rcdj4_9zq82h0Tl00S9GvEqDYh7yhPCNhnhBs3mZCg,1676
|
2
2
|
rgwfuncs/algebra_lib.py,sha256=rKFITfpWfgdBswnbMUuS41XgndEt-jUVz2ObO_ik7eM,42234
|
3
|
-
rgwfuncs/df_lib.py,sha256=
|
3
|
+
rgwfuncs/df_lib.py,sha256=Vu51bLhGJ2a8B_WnnbWWWseItg_7QjC3wz1Nu1cnLaA,68236
|
4
4
|
rgwfuncs/docs_lib.py,sha256=y3wSAOPO3qsA4HZ7xAtW8HimM8w-c8hjcEzMRLJ96ao,1960
|
5
5
|
rgwfuncs/interactive_shell_lib.py,sha256=A7EWsYxAfDev_N0-2GjRvAtp0bAwBPHIczXb8Gu9fzI,1107
|
6
6
|
rgwfuncs/str_lib.py,sha256=rtAdRlnSJIu3JhI-tA_A0wCiPK2m-zn5RoGpBxv_g-4,2228
|
7
|
-
rgwfuncs-0.0.
|
8
|
-
rgwfuncs-0.0.
|
9
|
-
rgwfuncs-0.0.
|
10
|
-
rgwfuncs-0.0.
|
11
|
-
rgwfuncs-0.0.
|
12
|
-
rgwfuncs-0.0.
|
7
|
+
rgwfuncs-0.0.62.dist-info/LICENSE,sha256=jLvt20gcUZYB8UOvyBvyKQ1qhYYhD__qP7ZDx2lPFkU,1062
|
8
|
+
rgwfuncs-0.0.62.dist-info/METADATA,sha256=0so_R3wQq4T5-FUXfurP9RxpRVxx-0Ce5SBHoBTTuls,58951
|
9
|
+
rgwfuncs-0.0.62.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
10
|
+
rgwfuncs-0.0.62.dist-info/entry_points.txt,sha256=j-c5IOPIQ0252EaOV6j6STio56sbXl2C4ym_fQ0lXx0,43
|
11
|
+
rgwfuncs-0.0.62.dist-info/top_level.txt,sha256=aGuVIzWsKiV1f2gCb6mynx0zx5ma0B1EwPGFKVEMTi4,9
|
12
|
+
rgwfuncs-0.0.62.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|