[IPython-dev] sorting rows of data frame using sort_values

Rajesh Bondugula bn121rajesh at gmail.com
Thu Oct 22 16:40:11 EDT 2015


hi,

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

Thanks
Rajesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151022/f1a00f6f/attachment.html>


More information about the IPython-dev mailing list