rgwfuncs 0.0.10__py3-none-any.whl → 0.0.11__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 CHANGED
@@ -1631,18 +1631,27 @@ def union_join(df1: pd.DataFrame, df2: pd.DataFrame) -> pd.DataFrame:
1631
1631
  if set(df1.columns) != set(df2.columns):
1632
1632
  raise ValueError("Both DataFrames must have the same columns for a union join")
1633
1633
 
1634
+ # Inspect initial columns
1635
+ print("Initial df1 columns:", df1.columns)
1636
+ print("Initial df2 columns:", df2.columns)
1637
+
1634
1638
  # Drop all-NA columns, if any
1635
1639
  df1_clean = df1.dropna(axis=1, how='all')
1636
1640
  df2_clean = df2.dropna(axis=1, how='all')
1637
1641
 
1642
+ # Inspect resulting columns after dropping all-NA columns
1643
+ print("Cleaned df1 columns:", df1_clean.columns)
1644
+ print("Cleaned df2 columns:", df2_clean.columns)
1645
+
1638
1646
  # Ensure they still have the same columns after dropping all-NA columns
1639
1647
  if set(df1_clean.columns) != set(df2_clean.columns):
1640
1648
  raise ValueError("Both DataFrames must have the same columns after dropping all-NA columns")
1641
-
1649
+
1642
1650
  result_df = pd.concat([df1_clean, df2_clean], ignore_index=True).drop_duplicates()
1643
1651
  return result_df
1644
1652
 
1645
1653
 
1654
+
1646
1655
  def bag_union_join(df1: pd.DataFrame, df2: pd.DataFrame) -> pd.DataFrame:
1647
1656
  """
1648
1657
  Perform a bag union join, concatenating the two DataFrames without dropping duplicates.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rgwfuncs
3
- Version: 0.0.10
3
+ Version: 0.0.11
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
@@ -0,0 +1,8 @@
1
+ rgwfuncs/__init__.py,sha256=BP8Nh8ivyCCz8Ga-21JW3NWInJFOElKoIfRuioJRWbA,1076
2
+ rgwfuncs/df_lib.py,sha256=N5XCe9LYMIVjh0pg2Xc1i3Md--mdNJyJ5t7NpO9x4-s,63973
3
+ rgwfuncs-0.0.11.dist-info/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
4
+ rgwfuncs-0.0.11.dist-info/METADATA,sha256=mqOIwsthIDAdpgtcFt35vW_xc99f2xtu5O_k4_Y-wQY,32059
5
+ rgwfuncs-0.0.11.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
6
+ rgwfuncs-0.0.11.dist-info/entry_points.txt,sha256=j-c5IOPIQ0252EaOV6j6STio56sbXl2C4ym_fQ0lXx0,43
7
+ rgwfuncs-0.0.11.dist-info/top_level.txt,sha256=aGuVIzWsKiV1f2gCb6mynx0zx5ma0B1EwPGFKVEMTi4,9
8
+ rgwfuncs-0.0.11.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- rgwfuncs/__init__.py,sha256=BP8Nh8ivyCCz8Ga-21JW3NWInJFOElKoIfRuioJRWbA,1076
2
- rgwfuncs/df_lib.py,sha256=RzQRjtIqiXB00xbx5jAyjVz6Gn4C18Qr7shheq0B8M4,63682
3
- rgwfuncs-0.0.10.dist-info/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
4
- rgwfuncs-0.0.10.dist-info/METADATA,sha256=mbs1IZjuzL9ZV5HGisK1gK9Ub2Mh55rIiUrP1b3Avvw,32059
5
- rgwfuncs-0.0.10.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
6
- rgwfuncs-0.0.10.dist-info/entry_points.txt,sha256=j-c5IOPIQ0252EaOV6j6STio56sbXl2C4ym_fQ0lXx0,43
7
- rgwfuncs-0.0.10.dist-info/top_level.txt,sha256=aGuVIzWsKiV1f2gCb6mynx0zx5ma0B1EwPGFKVEMTi4,9
8
- rgwfuncs-0.0.10.dist-info/RECORD,,