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

Fix method argument handling for pandas 2.1 #28816

Merged
merged 1 commit into from
Oct 4, 2023
Merged
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
4 changes: 2 additions & 2 deletions sdks/python/apache_beam/dataframe/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ def align(self, other, join, axis, level, method, **kwargs):
Only the default, ``method=None``, is allowed."""
if level is not None:
raise NotImplementedError('per-level align')
if method is not None:
if method is not None and method != lib.no_default:
raise frame_base.WontImplementError(
f"align(method={method!r}) is not supported because it is "
"order sensitive. Only align(method=None) is supported.",
Expand Down Expand Up @@ -2580,7 +2580,7 @@ def align(self, other, join, axis, copy, level, method, **kwargs):
"align(copy=False) is not supported because it might be an inplace "
"operation depending on the data. Please prefer the default "
"align(copy=True).")
if method is not None:
if method is not None and method != lib.no_default:
raise frame_base.WontImplementError(
f"align(method={method!r}) is not supported because it is "
"order sensitive. Only align(method=None) is supported.",
Expand Down
Loading