Skip to content

using sort_values for sorting according to row #11417

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

Closed
mas-dse-nbondugu opened this issue Oct 23, 2015 · 1 comment
Closed

using sort_values for sorting according to row #11417

mas-dse-nbondugu opened this issue Oct 23, 2015 · 1 comment
Labels
Duplicate Report Duplicate issue or pull request Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Comments

@mas-dse-nbondugu
Copy link

I have this data frame.

 728  562  599  642  592  686  602  744  640  678

309 96 29 99 63 73 48 81 48 13 25
337 40 25 41 47 14 33 54 63 33 45
395 64 95 63 90 52 82 66 26 26 20
264 38 56 73 17 98 56 80 77 44 49

I want to sort it horizontally based on row index 264
I tried:
df.sort_values(by=264, axis=1)

I gives me: ValueError: When sorting by column, axis must be 0 (rows)

What is the usecase with axis=1

@jorisvandenbossche
Copy link
Member

Thanks for the report.

This is just not yet implemented, see #10806 for the enhancement request. But I agree the error message makes this not really clear.

Closing as duplicate of #10806

@jorisvandenbossche jorisvandenbossche added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Duplicate Report Duplicate issue or pull request labels Oct 23, 2015
@jorisvandenbossche jorisvandenbossche added this to the No action milestone Oct 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Report Duplicate issue or pull request Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

No branches or pull requests

2 participants