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

Zoltán Vörös zvoros at gmail.com
Fri Oct 23 02:26:52 EDT 2015


But this surely is a pandas issue, if anything at all, so why don't you 
post your question on the relevant mailing list?

On 10/22/2015 10:40 PM, Rajesh Bondugula wrote:
> 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
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev




More information about the IPython-dev mailing list