rgwfuncs 0.0.5__py3-none-any.whl → 0.0.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rgwfuncs
3
- Version: 0.0.5
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
@@ -0,0 +1,8 @@
1
+ rgwfuncs/__init__.py,sha256=o4BBYVERWwAx8dknJ03yVCHqV9o8D1qrRgFeJrtpDWg,1041
2
+ rgwfuncs/df_lib.py,sha256=vYKElOUyMqBMC5EYA6vaqknpmVoOzNIyOWdJxMlzGcs,61137
3
+ rgwfuncs-0.0.6.dist-info/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
4
+ rgwfuncs-0.0.6.dist-info/METADATA,sha256=xFzwEq1qgtxKJ0kJk7OcU3tWDz8XRg47DqpGouIds_E,29328
5
+ rgwfuncs-0.0.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
6
+ rgwfuncs-0.0.6.dist-info/entry_points.txt,sha256=j-c5IOPIQ0252EaOV6j6STio56sbXl2C4ym_fQ0lXx0,43
7
+ rgwfuncs-0.0.6.dist-info/top_level.txt,sha256=aGuVIzWsKiV1f2gCb6mynx0zx5ma0B1EwPGFKVEMTi4,9
8
+ rgwfuncs-0.0.6.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- rgwfuncs/__init__.py,sha256=8suLAGE7rHBY9e2ViUJuRCUyiam4PO7bjNq_l59dW8Q,24
2
- rgwfuncs/df_lib.py,sha256=vkPOg0acDUwEYbyELNZ4OTJ9cHu9MbZaC4quN8XWtQY,63202
3
- rgwfuncs-0.0.5.dist-info/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
4
- rgwfuncs-0.0.5.dist-info/METADATA,sha256=mR9Dp1WY8pFwFXRyrzJ229pMO_3Na80AyYwqA32K4GY,26554
5
- rgwfuncs-0.0.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
6
- rgwfuncs-0.0.5.dist-info/entry_points.txt,sha256=j-c5IOPIQ0252EaOV6j6STio56sbXl2C4ym_fQ0lXx0,43
7
- rgwfuncs-0.0.5.dist-info/top_level.txt,sha256=aGuVIzWsKiV1f2gCb6mynx0zx5ma0B1EwPGFKVEMTi4,9
8
- rgwfuncs-0.0.5.dist-info/RECORD,,