DataFrame.sort_index does not use ascending when then value is a list with a single element · Issue #4839 · pandas-dev/pandas (original) (raw)

In [7]: d
Out[7]: {'one': [1.0, 2.0, 3.0, 4.0], 'two': [4.0, 3.0, 2.0, 1.0]}


In [11]: pd.DataFrame(d).sort_index(by=['two'], ascending=[0,])
Out[11]: 
   one  two
3    4    1
2    3    2
1    2    3
0    1    4

In [12]: pd.DataFrame(d).sort_index(by=['two'], ascending=0)
Out[12]: 
   one  two
0    1    4
1    2    3
2    3    2
3    4    1