rgwfuncs 0.0.13__tar.gz → 0.0.15__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.13/src/rgwfuncs.egg-info → rgwfuncs-0.0.15}/PKG-INFO +1 -1
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15}/pyproject.toml +1 -1
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15}/setup.cfg +1 -1
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15}/src/rgwfuncs/df_lib.py +7 -9
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15/src/rgwfuncs.egg-info}/PKG-INFO +1 -1
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15}/LICENSE +0 -0
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15}/README.md +0 -0
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15}/src/rgwfuncs/__init__.py +0 -0
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15}/src/rgwfuncs.egg-info/SOURCES.txt +0 -0
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15}/src/rgwfuncs.egg-info/dependency_links.txt +0 -0
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15}/src/rgwfuncs.egg-info/entry_points.txt +0 -0
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15}/src/rgwfuncs.egg-info/requires.txt +0 -0
- {rgwfuncs-0.0.13 → rgwfuncs-0.0.15}/src/rgwfuncs.egg-info/top_level.txt +0 -0
@@ -1614,7 +1614,6 @@ def mask_against_dataframe_converse(df: pd.DataFrame, other_df: pd.DataFrame, co
|
|
1614
1614
|
|
1615
1615
|
return df[~df[column_name].isin(other_df[column_name])]
|
1616
1616
|
|
1617
|
-
|
1618
1617
|
def union_join(df1: pd.DataFrame, df2: pd.DataFrame) -> pd.DataFrame:
|
1619
1618
|
"""
|
1620
1619
|
Perform a union join, concatenating the two DataFrames and dropping duplicates.
|
@@ -1633,19 +1632,19 @@ def union_join(df1: pd.DataFrame, df2: pd.DataFrame) -> pd.DataFrame:
|
|
1633
1632
|
# print("Initial df1 columns:", df1.columns)
|
1634
1633
|
# print("Initial df2 columns:", df2.columns)
|
1635
1634
|
|
1636
|
-
# Standardize columns by adding missing columns filled with
|
1635
|
+
# Standardize columns by adding missing columns filled with empty strings
|
1637
1636
|
for col in df2.columns:
|
1638
1637
|
if col not in df1:
|
1639
|
-
df1[col] =
|
1638
|
+
df1[col] = ""
|
1640
1639
|
|
1641
1640
|
for col in df1.columns:
|
1642
1641
|
if col not in df2:
|
1643
|
-
df2[col] =
|
1642
|
+
df2[col] = ""
|
1644
1643
|
|
1645
1644
|
# print("Standardized df1 columns:", df1.columns)
|
1646
1645
|
# print("Standardized df2 columns:", df2.columns)
|
1647
1646
|
|
1648
|
-
#
|
1647
|
+
# Ensure they have the same columns after standardizing
|
1649
1648
|
if set(df1.columns) != set(df2.columns):
|
1650
1649
|
raise ValueError("Both DataFrames must have the same columns after standardizing columns")
|
1651
1650
|
|
@@ -1653,7 +1652,6 @@ def union_join(df1: pd.DataFrame, df2: pd.DataFrame) -> pd.DataFrame:
|
|
1653
1652
|
result_df = pd.concat([df1, df2], ignore_index=True).drop_duplicates()
|
1654
1653
|
return result_df
|
1655
1654
|
|
1656
|
-
|
1657
1655
|
def bag_union_join(df1: pd.DataFrame, df2: pd.DataFrame) -> pd.DataFrame:
|
1658
1656
|
"""
|
1659
1657
|
Perform a bag union join, concatenating the two DataFrames without dropping duplicates.
|
@@ -1672,14 +1670,14 @@ def bag_union_join(df1: pd.DataFrame, df2: pd.DataFrame) -> pd.DataFrame:
|
|
1672
1670
|
# print("Initial df1 columns:", df1.columns)
|
1673
1671
|
# print("Initial df2 columns:", df2.columns)
|
1674
1672
|
|
1675
|
-
# Standardize columns by adding missing columns filled with
|
1673
|
+
# Standardize columns by adding missing columns filled with empty strings
|
1676
1674
|
for col in df2.columns:
|
1677
1675
|
if col not in df1:
|
1678
|
-
df1[col] =
|
1676
|
+
df1[col] = ""
|
1679
1677
|
|
1680
1678
|
for col in df1.columns:
|
1681
1679
|
if col not in df2:
|
1682
|
-
df2[col] =
|
1680
|
+
df2[col] = ""
|
1683
1681
|
|
1684
1682
|
# print("Standardized df1 columns:", df1.columns)
|
1685
1683
|
# print("Standardized df2 columns:", df2.columns)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|