Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated method parameter from merge and join. #9944

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions python/cudf/cudf/core/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -3438,7 +3438,6 @@ def merge(
sort=False,
lsuffix=None,
rsuffix=None,
method=None,
indicator=False,
suffixes=("_x", "_y"),
):
Expand Down Expand Up @@ -3490,9 +3489,6 @@ def merge(
suffixes: Tuple[str, str], defaults to ('_x', '_y')
Suffixes applied to overlapping column names on the left and right
sides
method :
This parameter is unused. It is deprecated and will be removed in a
future version.
Returns
-------
Expand Down Expand Up @@ -3554,13 +3550,6 @@ def merge(
else:
lsuffix, rsuffix = suffixes

if method is not None:
warnings.warn(
"The 'method' argument is deprecated and will be removed "
"in a future version of cudf.",
FutureWarning,
)

# Compute merge
gdf_result = super()._merge(
right,
Expand All @@ -3578,14 +3567,7 @@ def merge(

@annotate("JOIN", color="blue", domain="cudf_python")
def join(
self,
other,
on=None,
how="left",
lsuffix="",
rsuffix="",
sort=False,
method=None,
self, other, on=None, how="left", lsuffix="", rsuffix="", sort=False,
):
"""Join columns with other DataFrame on index or on a key column.
Expand All @@ -3599,9 +3581,6 @@ def join(
column names when avoiding conflicts.
sort : bool
Set to True to ensure sorted ordering.
method :
This parameter is unused. It is deprecated and will be removed in a
future version.
Returns
-------
Expand All @@ -3615,13 +3594,6 @@ def join(
- *on* is not supported yet due to lack of multi-index support.
"""

if method is not None:
warnings.warn(
"The 'method' argument is deprecated and will be removed "
"in a future version of cudf.",
FutureWarning,
)

df = self.merge(
other,
left_index=True,
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/tests/test_joining.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def test_dataframe_join_mismatch_cats(how):

pdf1 = pdf1.set_index("join_col")
pdf2 = pdf2.set_index("join_col")
join_gdf = gdf1.join(gdf2, how=how, sort=True, method="hash")
join_gdf = gdf1.join(gdf2, how=how, sort=True)
join_pdf = pdf1.join(pdf2, how=how)

got = join_gdf.fillna(-1).to_pandas()
Expand Down Expand Up @@ -403,7 +403,7 @@ def test_dataframe_merge_order():
gdf2["id"] = [4, 5]
gdf2["a"] = [7, 8]

gdf = gdf1.merge(gdf2, how="left", on=["id", "a"], method="hash")
gdf = gdf1.merge(gdf2, how="left", on=["id", "a"])

df1 = pd.DataFrame()
df2 = pd.DataFrame()
Expand Down