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
Comment From: jorisvandenbossche
Thanks for the report.
This is just not yet implemented, see https://github.com/pydata/pandas/issues/10806 for the enhancement request. But I agree the error message makes this not really clear.
Closing as duplicate of https://github.com/pydata/pandas/issues/10806