rgwfuncs 0.0.19__py3-none-any.whl → 0.0.20__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 +4 -12
- {rgwfuncs-0.0.19.dist-info → rgwfuncs-0.0.20.dist-info}/METADATA +2 -2
- rgwfuncs-0.0.20.dist-info/RECORD +9 -0
- rgwfuncs-0.0.19.dist-info/RECORD +0 -9
- {rgwfuncs-0.0.19.dist-info → rgwfuncs-0.0.20.dist-info}/LICENSE +0 -0
- {rgwfuncs-0.0.19.dist-info → rgwfuncs-0.0.20.dist-info}/WHEEL +0 -0
- {rgwfuncs-0.0.19.dist-info → rgwfuncs-0.0.20.dist-info}/entry_points.txt +0 -0
- {rgwfuncs-0.0.19.dist-info → rgwfuncs-0.0.20.dist-info}/top_level.txt +0 -0
rgwfuncs/df_lib.py
CHANGED
@@ -1673,21 +1673,16 @@ def print_n_frequency_cascading(
|
|
1673
1673
|
print(json.dumps(report, indent=2))
|
1674
1674
|
|
1675
1675
|
|
1676
|
-
def print_n_frequency_linear(
|
1677
|
-
df: pd.DataFrame,
|
1678
|
-
n: int,
|
1679
|
-
columns: str,
|
1680
|
-
order_by: str = "FREQ_DESC") -> None:
|
1676
|
+
def print_n_frequency_linear(df: pd.DataFrame, n: int, columns: list, order_by: str = "FREQ_DESC") -> None:
|
1681
1677
|
"""
|
1682
1678
|
Print the linear frequency of top n values for specified columns.
|
1683
1679
|
|
1684
1680
|
Parameters:
|
1685
1681
|
df: DataFrame to analyze.
|
1686
1682
|
n: Number of top values to print.
|
1687
|
-
columns:
|
1688
|
-
order_by: Order of frequency:
|
1683
|
+
columns: List of column names to analyze.
|
1684
|
+
order_by: Order of frequency: ASC, DESC, FREQ_ASC, FREQ_DESC.
|
1689
1685
|
"""
|
1690
|
-
columns = [col.strip() for col in columns.split(",")]
|
1691
1686
|
|
1692
1687
|
def generate_linear_report(df, columns, limit, order_by):
|
1693
1688
|
report = {}
|
@@ -1942,10 +1937,7 @@ def insert_dataframe_in_sqlite_database(db_path: str, tablename: str, df: pd.Dat
|
|
1942
1937
|
df.to_sql(tablename, conn, if_exists='append', index=False)
|
1943
1938
|
|
1944
1939
|
|
1945
|
-
def sync_dataframe_to_sqlite_database(
|
1946
|
-
db_path: str,
|
1947
|
-
tablename: str,
|
1948
|
-
df: pd.DataFrame) -> None:
|
1940
|
+
def sync_dataframe_to_sqlite_database(db_path: str, tablename: str, df: pd.DataFrame) -> None:
|
1949
1941
|
"""
|
1950
1942
|
Processes and saves a DataFrame to an SQLite database, adding a timestamp column
|
1951
1943
|
and replacing the existing table if needed. Creates the table if it does not exist.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: rgwfuncs
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.20
|
4
4
|
Summary: A functional programming paradigm for mathematical modelling and data science
|
5
5
|
Home-page: https://github.com/ryangerardwilson/rgwfunc
|
6
6
|
Author: Ryan Gerard Wilson
|
@@ -28,7 +28,7 @@ Requires-Dist: google-api-python-client
|
|
28
28
|
|
29
29
|
***By Ryan Gerard Wilson (https://ryangerardwilson.com)***
|
30
30
|
|
31
|
-
This library is meant to make ML/ Data Science pipelines more readable. It assumes a linux environment, and the existence of a `
|
31
|
+
This library is meant to make ML/ Data Science pipelines more readable. It assumes a linux environment, and the existence of a `.rgwfuncsrc` file for certain features (like db querying, sending data to slack, etc.)
|
32
32
|
|
33
33
|
--------------------------------------------------------------------------------
|
34
34
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
rgwfuncs/__init__.py,sha256=2nrp3c5VmVrKh0Ih6zELL8niH9nAHN0XnObqe-EpxlE,1169
|
2
|
+
rgwfuncs/df_lib.py,sha256=3iWQ-iqKbgCLJsMc5DdnxrZ3sSEMDNZNyOsU6pJy060,67028
|
3
|
+
rgwfuncs/str_lib.py,sha256=I5B0WOGaLUGaedMG7hqiKnIqV7Jc9h1RYlgOiC_-iGY,3678
|
4
|
+
rgwfuncs-0.0.20.dist-info/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
|
5
|
+
rgwfuncs-0.0.20.dist-info/METADATA,sha256=S1_hL1vNpRPV1uc9RIFatPKoR-e3LhZRysNKCjIM_T0,34680
|
6
|
+
rgwfuncs-0.0.20.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
7
|
+
rgwfuncs-0.0.20.dist-info/entry_points.txt,sha256=j-c5IOPIQ0252EaOV6j6STio56sbXl2C4ym_fQ0lXx0,43
|
8
|
+
rgwfuncs-0.0.20.dist-info/top_level.txt,sha256=aGuVIzWsKiV1f2gCb6mynx0zx5ma0B1EwPGFKVEMTi4,9
|
9
|
+
rgwfuncs-0.0.20.dist-info/RECORD,,
|
rgwfuncs-0.0.19.dist-info/RECORD
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
rgwfuncs/__init__.py,sha256=2nrp3c5VmVrKh0Ih6zELL8niH9nAHN0XnObqe-EpxlE,1169
|
2
|
-
rgwfuncs/df_lib.py,sha256=KVe7o9P3XZEDUlF-ilwA7bRZeJi212vSayCfxFCsXtw,67151
|
3
|
-
rgwfuncs/str_lib.py,sha256=I5B0WOGaLUGaedMG7hqiKnIqV7Jc9h1RYlgOiC_-iGY,3678
|
4
|
-
rgwfuncs-0.0.19.dist-info/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
|
5
|
-
rgwfuncs-0.0.19.dist-info/METADATA,sha256=q6-lkZGd4szwaagm98MKtFrM7XoC8CW9lZqwEbY_hEk,34681
|
6
|
-
rgwfuncs-0.0.19.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
7
|
-
rgwfuncs-0.0.19.dist-info/entry_points.txt,sha256=j-c5IOPIQ0252EaOV6j6STio56sbXl2C4ym_fQ0lXx0,43
|
8
|
-
rgwfuncs-0.0.19.dist-info/top_level.txt,sha256=aGuVIzWsKiV1f2gCb6mynx0zx5ma0B1EwPGFKVEMTi4,9
|
9
|
-
rgwfuncs-0.0.19.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|