Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Comments

Projects
None yet
2 participants
@jburroni
Copy link

commented Sep 13, 2013

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

This comment has been minimized.

Copy link
Member

commented Sep 14, 2013

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

@jburroni

This comment has been minimized.

Copy link
Author

commented Sep 14, 2013

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
You can’t perform that action at this time.