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

Deprecate nonkeyword args set axis #41491

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli force-pushed the deprecate-nonkeyword-args-set_axis branch from e1b393f to 1082e62 Compare May 15, 2021 18:23
@simonjayhawkins simonjayhawkins added the Deprecate Functionality to remove in pandas label May 17, 2021
@simonjayhawkins simonjayhawkins added this to the 1.3 milestone May 17, 2021
r"arguments 'self' and 'labels' will be keyword-only"
)
with tm.assert_produces_warning(FutureWarning, match=msg):
df.set_axis([1, 2, 4], False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
df.set_axis([1, 2, 4], False)
df.set_axis([1, 2, 4], 0)

? (since it's for the axis keyword)

Also the same comment as in one of the other PRs, I would still assert the actual result to ensure we keep this working correctly until it's actually removed

@MarcoGorelli MarcoGorelli marked this pull request as draft May 18, 2021 08:14
@MarcoGorelli MarcoGorelli marked this pull request as ready for review May 19, 2021 20:14
@jreback
Copy link
Contributor

jreback commented May 27, 2021

can u rebase

@@ -691,7 +691,8 @@ Deprecations
- Deprecated passing arguments as positional in :meth:`DataFrame.drop_duplicates` (except for ``subset``), :meth:`Series.drop_duplicates`, :meth:`Index.drop_duplicates` and :meth:`MultiIndex.drop_duplicates`(:issue:`41485`)
- Deprecated passing arguments (apart from ``value``) as positional in :meth:`DataFrame.fillna` and :meth:`Series.fillna` (:issue:`41485`)
- Deprecated passing arguments as positional in :meth:`DataFrame.reset_index` (other than ``"level"``) and :meth:`Series.reset_index` (:issue:`41485`)
- Deprecated construction of :class:`Series` or :class:`DataFrame` with ``DatetimeTZDtype`` data and ``datetime64[ns]`` dtype. Use ``Series(data).dt.tz_localize(None)`` instead (:issue:`41555`,:issue:`33401`)
- Deprecatedconstruction of :class:`Series` or :class:`DataFrame` with ``DatetimeTZDtype`` data and ``datetime64[ns]`` dtype. Use ``Series(data).dt.tz_localize(None)`` instead (:issue:`41555`,:issue:`33401`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops.

Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MarcoGorelli lgtm pending greenish

@simonjayhawkins simonjayhawkins merged commit a25c2f1 into pandas-dev:master May 27, 2021
@MarcoGorelli MarcoGorelli deleted the deprecate-nonkeyword-args-set_axis branch May 27, 2021 12:23
TLouf pushed a commit to TLouf/pandas that referenced this pull request Jun 1, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants