DataFrame.sort_index does not use ascending when then value is a list with a single element #1084

Closed
jburroni opened this Issue Sep 13, 2013 · 2 comments

Projects

None yet

2 participants

@jburroni
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
@josef-pkt
Member

Is this a pandas issue, or does this affect statsmodels in the current code?

@jburroni

my mistake. Closed

@jburroni jburroni closed this Sep 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment