-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Not able to change direction of sort on per column basis for DataFrame #928
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
Comments
I wish to have this feature too, which can be done in MS Excel. |
I was thinking you would do
any opinions? |
Thanks for the quick response. |
About as short as you can make it I guess. |
That's clever; it didn't occur to me. Thanks. Then, I think your proposal serves my need. |
Got around to this finally:
|
Thanks a lot. |
The
sort
method on DataFrame supports sorting by multiple columns, yet only supports sorting in one direction (ascending or descending). It would be great to specify this. Perhaps something like this:df.sort(columns=['Name|descending', 'Age']
which would sort name first in descending order and then where names match use ascending order.Also I see no mention of whether the sort is stable. If it is, this can be replicated by multiple sort calls.
The text was updated successfully, but these errors were encountered: