-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: DataFrame.swapaxes #51960
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
DEPR: DataFrame.swapaxes #51960
Changes from all commits
1c4c627
38ca9cf
7dd96b4
158961b
9890bf9
5b60460
3595fb4
532ee3a
91c2346
3c027ec
058043d
1522aa4
a052f5e
126817c
5f66aee
6647c6e
d23f0df
2b31454
09cf70a
f1f661b
02811fb
8b7cd97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,7 +251,6 @@ | |
operator.methodcaller("isin", pd.DataFrame({"A": [1]})), | ||
), | ||
), | ||
(pd.DataFrame, frame_data, operator.methodcaller("swapaxes", 0, 1)), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems that this file is testing all existing finalize methods, so I removed |
||
(pd.DataFrame, frame_mi_data, operator.methodcaller("droplevel", "A")), | ||
(pd.DataFrame, frame_data, operator.methodcaller("pop", "A")), | ||
pytest.param( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -230,8 +230,11 @@ def test_size_compat(self, frame_or_series): | |
def test_split_compat(self, frame_or_series): | ||
# xref GH8846 | ||
o = construct(frame_or_series, shape=10) | ||
assert len(np.array_split(o, 5)) == 5 | ||
assert len(np.array_split(o, 2)) == 2 | ||
with tm.assert_produces_warning( | ||
FutureWarning, match=".swapaxes' is deprecated", check_stacklevel=False | ||
): | ||
assert len(np.array_split(o, 5)) == 5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is swapaxes being called here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It will raise an warning (maybe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes. If remove |
||
assert len(np.array_split(o, 2)) == 2 | ||
|
||
# See gh-12301 | ||
def test_stat_unexpected_keyword(self, frame_or_series): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if nested blocks of code are better expressed. (
pytest
may break pre-commit)