rgwfuncs 0.0.5__tar.gz → 0.0.6__tar.gz
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-0.0.5/src/rgwfuncs.egg-info → rgwfuncs-0.0.6}/PKG-INFO +98 -1
- {rgwfuncs-0.0.5 → rgwfuncs-0.0.6}/README.md +97 -0
- {rgwfuncs-0.0.5 → rgwfuncs-0.0.6}/pyproject.toml +1 -1
- {rgwfuncs-0.0.5 → rgwfuncs-0.0.6}/setup.cfg +1 -1
- rgwfuncs-0.0.6/src/rgwfuncs/__init__.py +4 -0
- {rgwfuncs-0.0.5 → rgwfuncs-0.0.6}/src/rgwfuncs/df_lib.py +209 -503
- {rgwfuncs-0.0.5 → rgwfuncs-0.0.6/src/rgwfuncs.egg-info}/PKG-INFO +98 -1
- rgwfuncs-0.0.5/src/rgwfuncs/__init__.py +0 -3
- {rgwfuncs-0.0.5 → rgwfuncs-0.0.6}/LICENSE +0 -0
- {rgwfuncs-0.0.5 → rgwfuncs-0.0.6}/src/rgwfuncs.egg-info/SOURCES.txt +0 -0
- {rgwfuncs-0.0.5 → rgwfuncs-0.0.6}/src/rgwfuncs.egg-info/dependency_links.txt +0 -0
- {rgwfuncs-0.0.5 → rgwfuncs-0.0.6}/src/rgwfuncs.egg-info/entry_points.txt +0 -0
- {rgwfuncs-0.0.5 → rgwfuncs-0.0.6}/src/rgwfuncs.egg-info/requires.txt +0 -0
- {rgwfuncs-0.0.5 → rgwfuncs-0.0.6}/src/rgwfuncs.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: rgwfuncs
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.6
|
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
|
@@ -978,6 +978,103 @@ Retain only rows with uncommon column values between two DataFrames.
|
|
978
978
|
print(df_uncommon)
|
979
979
|
|
980
980
|
|
981
|
+
--------------------------------------------------------------------------------
|
982
|
+
|
983
|
+
### 41. `union_join`
|
984
|
+
Perform a union join, concatenating two DataFrames and dropping duplicates.
|
985
|
+
|
986
|
+
• Parameters:
|
987
|
+
- `df1` (pd.DataFrame): First DataFrame.
|
988
|
+
- `df2` (pd.DataFrame): Second DataFrame.
|
989
|
+
|
990
|
+
• Returns:
|
991
|
+
- pd.DataFrame: A new DataFrame with the union of `df1` and `df2`, without duplicates.
|
992
|
+
|
993
|
+
• Example:
|
994
|
+
|
995
|
+
from rgwfuncs import union_join
|
996
|
+
import pandas as pd
|
997
|
+
|
998
|
+
df1 = pd.DataFrame({'ID': [1, 2, 3], 'Value': [10, 20, 30]})
|
999
|
+
df2 = pd.DataFrame({'ID': [2, 3, 4], 'Value': [20, 30, 40]})
|
1000
|
+
|
1001
|
+
df_union = union_join(df1, df2)
|
1002
|
+
print(df_union)
|
1003
|
+
|
1004
|
+
--------------------------------------------------------------------------------
|
1005
|
+
|
1006
|
+
### 42. `bag_union_join`
|
1007
|
+
Perform a bag union join, concatenating two DataFrames without dropping duplicates.
|
1008
|
+
|
1009
|
+
• Parameters:
|
1010
|
+
- `df1` (pd.DataFrame): First DataFrame.
|
1011
|
+
- `df2` (pd.DataFrame): Second DataFrame.
|
1012
|
+
|
1013
|
+
• Returns:
|
1014
|
+
- pd.DataFrame: A new DataFrame with the concatenated data of `df1` and `df2`.
|
1015
|
+
|
1016
|
+
• Example:
|
1017
|
+
|
1018
|
+
from rgwfuncs import bag_union_join
|
1019
|
+
import pandas as pd
|
1020
|
+
|
1021
|
+
df1 = pd.DataFrame({'ID': [1, 2, 3], 'Value': [10, 20, 30]})
|
1022
|
+
df2 = pd.DataFrame({'ID': [2, 3, 4], 'Value': [20, 30, 40]})
|
1023
|
+
|
1024
|
+
df_bag_union = bag_union_join(df1, df2)
|
1025
|
+
print(df_bag_union)
|
1026
|
+
|
1027
|
+
--------------------------------------------------------------------------------
|
1028
|
+
|
1029
|
+
### 43. `left_join`
|
1030
|
+
Perform a left join on two DataFrames.
|
1031
|
+
|
1032
|
+
• Parameters:
|
1033
|
+
- `df1` (pd.DataFrame): The left DataFrame.
|
1034
|
+
- `df2` (pd.DataFrame): The right DataFrame.
|
1035
|
+
- `left_on` (str): Column name in `df1` to join on.
|
1036
|
+
- `right_on` (str): Column name in `df2` to join on.
|
1037
|
+
|
1038
|
+
• Returns:
|
1039
|
+
- pd.DataFrame: A new DataFrame as the result of a left join.
|
1040
|
+
|
1041
|
+
• Example:
|
1042
|
+
|
1043
|
+
from rgwfuncs import left_join
|
1044
|
+
import pandas as pd
|
1045
|
+
|
1046
|
+
df1 = pd.DataFrame({'ID': [1, 2, 3], 'Value': [10, 20, 30]})
|
1047
|
+
df2 = pd.DataFrame({'ID': [2, 3, 4], 'Extra': ['A', 'B', 'C']})
|
1048
|
+
|
1049
|
+
df_left_join = left_join(df1, df2, 'ID', 'ID')
|
1050
|
+
print(df_left_join)
|
1051
|
+
|
1052
|
+
--------------------------------------------------------------------------------
|
1053
|
+
|
1054
|
+
### 44. `right_join`
|
1055
|
+
Perform a right join on two DataFrames.
|
1056
|
+
|
1057
|
+
• Parameters:
|
1058
|
+
- `df1` (pd.DataFrame): The left DataFrame.
|
1059
|
+
- `df2` (pd.DataFrame): The right DataFrame.
|
1060
|
+
- `left_on` (str): Column name in `df1` to join on.
|
1061
|
+
- `right_on` (str): Column name in `df2` to join on.
|
1062
|
+
|
1063
|
+
• Returns:
|
1064
|
+
- pd.DataFrame: A new DataFrame as the result of a right join.
|
1065
|
+
|
1066
|
+
• Example:
|
1067
|
+
|
1068
|
+
from rgwfuncs import right_join
|
1069
|
+
import pandas as pd
|
1070
|
+
|
1071
|
+
df1 = pd.DataFrame({'ID': [1, 2, 3], 'Value': [10, 20, 30]})
|
1072
|
+
df2 = pd.DataFrame({'ID': [2, 3, 4], 'Extra': ['A', 'B', 'C']})
|
1073
|
+
|
1074
|
+
df_right_join = right_join(df1, df2, 'ID', 'ID')
|
1075
|
+
print(df_right_join)
|
1076
|
+
|
1077
|
+
|
981
1078
|
--------------------------------------------------------------------------------
|
982
1079
|
|
983
1080
|
## Additional Info
|
@@ -952,6 +952,103 @@ Retain only rows with uncommon column values between two DataFrames.
|
|
952
952
|
print(df_uncommon)
|
953
953
|
|
954
954
|
|
955
|
+
--------------------------------------------------------------------------------
|
956
|
+
|
957
|
+
### 41. `union_join`
|
958
|
+
Perform a union join, concatenating two DataFrames and dropping duplicates.
|
959
|
+
|
960
|
+
• Parameters:
|
961
|
+
- `df1` (pd.DataFrame): First DataFrame.
|
962
|
+
- `df2` (pd.DataFrame): Second DataFrame.
|
963
|
+
|
964
|
+
• Returns:
|
965
|
+
- pd.DataFrame: A new DataFrame with the union of `df1` and `df2`, without duplicates.
|
966
|
+
|
967
|
+
• Example:
|
968
|
+
|
969
|
+
from rgwfuncs import union_join
|
970
|
+
import pandas as pd
|
971
|
+
|
972
|
+
df1 = pd.DataFrame({'ID': [1, 2, 3], 'Value': [10, 20, 30]})
|
973
|
+
df2 = pd.DataFrame({'ID': [2, 3, 4], 'Value': [20, 30, 40]})
|
974
|
+
|
975
|
+
df_union = union_join(df1, df2)
|
976
|
+
print(df_union)
|
977
|
+
|
978
|
+
--------------------------------------------------------------------------------
|
979
|
+
|
980
|
+
### 42. `bag_union_join`
|
981
|
+
Perform a bag union join, concatenating two DataFrames without dropping duplicates.
|
982
|
+
|
983
|
+
• Parameters:
|
984
|
+
- `df1` (pd.DataFrame): First DataFrame.
|
985
|
+
- `df2` (pd.DataFrame): Second DataFrame.
|
986
|
+
|
987
|
+
• Returns:
|
988
|
+
- pd.DataFrame: A new DataFrame with the concatenated data of `df1` and `df2`.
|
989
|
+
|
990
|
+
• Example:
|
991
|
+
|
992
|
+
from rgwfuncs import bag_union_join
|
993
|
+
import pandas as pd
|
994
|
+
|
995
|
+
df1 = pd.DataFrame({'ID': [1, 2, 3], 'Value': [10, 20, 30]})
|
996
|
+
df2 = pd.DataFrame({'ID': [2, 3, 4], 'Value': [20, 30, 40]})
|
997
|
+
|
998
|
+
df_bag_union = bag_union_join(df1, df2)
|
999
|
+
print(df_bag_union)
|
1000
|
+
|
1001
|
+
--------------------------------------------------------------------------------
|
1002
|
+
|
1003
|
+
### 43. `left_join`
|
1004
|
+
Perform a left join on two DataFrames.
|
1005
|
+
|
1006
|
+
• Parameters:
|
1007
|
+
- `df1` (pd.DataFrame): The left DataFrame.
|
1008
|
+
- `df2` (pd.DataFrame): The right DataFrame.
|
1009
|
+
- `left_on` (str): Column name in `df1` to join on.
|
1010
|
+
- `right_on` (str): Column name in `df2` to join on.
|
1011
|
+
|
1012
|
+
• Returns:
|
1013
|
+
- pd.DataFrame: A new DataFrame as the result of a left join.
|
1014
|
+
|
1015
|
+
• Example:
|
1016
|
+
|
1017
|
+
from rgwfuncs import left_join
|
1018
|
+
import pandas as pd
|
1019
|
+
|
1020
|
+
df1 = pd.DataFrame({'ID': [1, 2, 3], 'Value': [10, 20, 30]})
|
1021
|
+
df2 = pd.DataFrame({'ID': [2, 3, 4], 'Extra': ['A', 'B', 'C']})
|
1022
|
+
|
1023
|
+
df_left_join = left_join(df1, df2, 'ID', 'ID')
|
1024
|
+
print(df_left_join)
|
1025
|
+
|
1026
|
+
--------------------------------------------------------------------------------
|
1027
|
+
|
1028
|
+
### 44. `right_join`
|
1029
|
+
Perform a right join on two DataFrames.
|
1030
|
+
|
1031
|
+
• Parameters:
|
1032
|
+
- `df1` (pd.DataFrame): The left DataFrame.
|
1033
|
+
- `df2` (pd.DataFrame): The right DataFrame.
|
1034
|
+
- `left_on` (str): Column name in `df1` to join on.
|
1035
|
+
- `right_on` (str): Column name in `df2` to join on.
|
1036
|
+
|
1037
|
+
• Returns:
|
1038
|
+
- pd.DataFrame: A new DataFrame as the result of a right join.
|
1039
|
+
|
1040
|
+
• Example:
|
1041
|
+
|
1042
|
+
from rgwfuncs import right_join
|
1043
|
+
import pandas as pd
|
1044
|
+
|
1045
|
+
df1 = pd.DataFrame({'ID': [1, 2, 3], 'Value': [10, 20, 30]})
|
1046
|
+
df2 = pd.DataFrame({'ID': [2, 3, 4], 'Extra': ['A', 'B', 'C']})
|
1047
|
+
|
1048
|
+
df_right_join = right_join(df1, df2, 'ID', 'ID')
|
1049
|
+
print(df_right_join)
|
1050
|
+
|
1051
|
+
|
955
1052
|
--------------------------------------------------------------------------------
|
956
1053
|
|
957
1054
|
## Additional Info
|
@@ -0,0 +1,4 @@
|
|
1
|
+
# This file is automatically generated
|
2
|
+
# Dynamically importing functions from modules
|
3
|
+
|
4
|
+
from .df_lib import append_columns, append_percentile_classification_column, append_ranged_classification_column, append_ranged_date_classification_column, append_rows, append_xgb_labels, append_xgb_logistic_regression_predictions, append_xgb_regression_predictions, bag_union_join, bottom_n_unique_values, cascade_sort, delete_rows, docs, drop_duplicates, drop_duplicates_retain_first, drop_duplicates_retain_last, filter_dataframe, filter_indian_mobiles, first_n_rows, from_raw_data, last_n_rows, left_join, limit_dataframe, load_data_from_path, load_data_from_query, load_data_from_sqlite_path, mask_against_dataframe, mask_against_dataframe_converse, numeric_clean, order_columns, print_correlation, print_dataframe, print_memory_usage, print_n_frequency_cascading, print_n_frequency_linear, rename_columns, retain_columns, right_join, send_data_to_email, send_data_to_slack, send_dataframe_via_telegram, top_n_unique_values, union_join, update_rows
|