-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix sort_values for empty by argument #40324
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
Changes from 2 commits
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 |
---|---|---|
|
@@ -79,6 +79,11 @@ def test_sort_values(self): | |
with pytest.raises(ValueError, match=msg): | ||
frame.sort_values(by=["A", "B"], axis=0, ascending=[True] * 5) | ||
|
||
# https://github.com/pandas-dev/pandas/issues/40258 | ||
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. can you add a separate test. also assert that it is not the same frame. 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. can you make a completely separate test 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. we dont' normally want to mix error checking with other things |
||
sorted_df = frame.sort_values(by=[]) | ||
tm.assert_frame_equal(sorted_df, frame) | ||
assert sorted_df is not frame | ||
|
||
def test_sort_values_inplace(self): | ||
frame = DataFrame( | ||
np.random.randn(4, 4), index=[1, 2, 3, 4], columns=["A", "B", "C", "D"] | ||
|
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.
move to 1.3, this is an expansion not a regression.