using sort_values for sorting according to row #11417
Labels
Duplicate Report
Duplicate issue or pull request
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
I have this data frame.
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
The text was updated successfully, but these errors were encountered: