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 editor should first sort up, then down #3020

Closed
jondo opened this issue Mar 1, 2016 · 1 comment
Closed

DataFrame editor should first sort up, then down #3020

jondo opened this issue Mar 1, 2016 · 1 comment

Comments

@jondo
Copy link
Contributor

jondo commented Mar 1, 2016

Description of your problem

When clicking a column header in the DataFrame editor, the column is sorted from high to low. A second click sorts it from low to high. Since sorting from low to high is needed much more often, the effects of the first and the second click should be reversed.

What steps will reproduce the problem?

  1. Open a Pandas DataFrame in the editor.
  2. Click on a column header.

What is the expected output?
The DataFrame column is sorted s.t. the lowest value is on top.

What do you see instead?
The DataFrame column is sorted s.t. the lowest value is on bottom.

Please provide any additional information below
N/A

Versions and main components

  • Spyder Version: 2.3.5.2 from WinPython-64bit-3.4.3.5.
  • Python Version: 3.4.3
  • Operating system: Windows 7 64-bit

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

IPython >=1.0 : 3.2.1 (OK)
jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0: 1.4.3 (OK)
pandas >=0.13.1 : 0.16.2 (OK)
pep8 >=0.6 : 1.6.2 (OK)
pyflakes >=0.6.0: 0.9.2 (OK)
pygments >=1.6 : 2.0.2 (OK)
pylint >=0.25 : 1.4.3 (OK)
rope >=0.9.2 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.3.1 (OK)
sympy >=0.7.3 : 0.7.6 (OK)
zmq >=2.1.11 : 14.7.0 (OK)

@ccordoba12 ccordoba12 added this to the v3.0rc1 milestone Mar 1, 2016
@ccordoba12 ccordoba12 modified the milestones: v3.1, v3.0rc1 Jun 9, 2016
jitseniesen added a commit to jitseniesen/spyder that referenced this issue Jun 19, 2016
- Set ascending flag correctly, fixes spyder-ide#3020.
- Use mergesort so that sorting is stable, fixes spyder-ide#3010.
- Use .sort_values() because .sort() is deprecated since pandas 0.17.
@ccordoba12 ccordoba12 modified the milestones: v3.0beta4, v3.1 Jun 20, 2016
@jitseniesen
Copy link
Member

I think the code was actually supposed to first sort up, then down, just as suggested here; look at the little triangle in the column header of the data frame editor.

jitseniesen added a commit to jitseniesen/spyder that referenced this issue Jun 21, 2016
- Set ascending flag correctly, fixes spyder-ide#3020.
- Use mergesort so that sorting is stable, fixes spyder-ide#3010.
- Use .sort_values() because .sort() is deprecated since pandas 0.17.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants