Skip to content

Commit

Permalink
Fix handling of new default for method arg for Pandas 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
caneff committed Oct 4, 2023
1 parent c01b41f commit 46c87c4
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 46c87c4

Please sign in to comment.