This is an automated email from the ASF dual-hosted git repository.
tvalentyn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new f2a0c76703b Remove inplace argument from set_axis for Pandas 2 (#28536)
f2a0c76703b is described below
commit f2a0c76703bb78cb46b5e67f86d4b353cf0d6a3d
Author: caneff <[email protected]>
AuthorDate: Tue Sep 19 14:52:56 2023 -0400
Remove inplace argument from set_axis for Pandas 2 (#28536)
---
sdks/python/apache_beam/dataframe/frames.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sdks/python/apache_beam/dataframe/frames.py
b/sdks/python/apache_beam/dataframe/frames.py
index 34fc17553b0..b864e952e19 100644
--- a/sdks/python/apache_beam/dataframe/frames.py
+++ b/sdks/python/apache_beam/dataframe/frames.py
@@ -1901,7 +1901,8 @@ class DeferredSeries(DeferredDataFrameOrSeries):
@frame_base.with_docs_from(pd.Series)
@frame_base.args_to_kwargs(pd.Series)
- @frame_base.populate_defaults(pd.Series)
+ @frame_base.populate_defaults(
+ pd.Series, removed_args=['inplace'] if PD_VERSION >= (2, 0) else None)
@frame_base.maybe_inplace
def set_axis(self, labels, **kwargs):
# TODO: assigning the index is generally order-sensitive, but we could
@@ -2675,7 +2676,9 @@ class DeferredDataFrame(DeferredDataFrameOrSeries):
@frame_base.with_docs_from(pd.DataFrame)
@frame_base.args_to_kwargs(pd.DataFrame)
- @frame_base.populate_defaults(pd.DataFrame)
+ @frame_base.populate_defaults(
+ pd.DataFrame,
+ removed_args=['inplace'] if PD_VERSION >= (2, 0) else None)
@frame_base.maybe_inplace
def set_axis(self, labels, axis, **kwargs):
if axis in ('index', 0):