-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Sort broken using MultiIndex with mixed ascending
#16934
Labels
Milestone
Comments
@gfyoung I've edited the issue to add expected output and removed the |
@alubbock : Thanks! Feel free to submit a PR for this if you know where the issue is. |
alubbock
added a commit
to alubbock/pandas
that referenced
this issue
Jul 15, 2017
MultiIndex sorting with `sort_index` would fail when the `ascending` argument was specified as a list but not all levels of the index were specified in the `level` argument, or the levels were specified in a different order to the MultiIndex. This PR rectifies the issue and introduces a unit test based on pandas-dev#16934 Fixes: pandas-dev#16934
alubbock
added a commit
to alubbock/pandas
that referenced
this issue
Jul 15, 2017
MultiIndex sorting with `sort_index` would fail when the `ascending` argument was specified as a list but not all levels of the index were specified in the `level` argument, or the levels were specified in a different order to the MultiIndex. This PR rectifies the issue and introduces a unit test based on pandas-dev#16934 Fixes: pandas-dev#16934
alubbock
added a commit
to alubbock/pandas
that referenced
this issue
Jul 15, 2017
MultiIndex sorting with `sort_index` would fail when the `ascending` argument was specified as a list but not all levels of the index were specified in the `level` argument, or the levels were specified in a different order to the MultiIndex. This PR rectifies the issue and introduces a unit test based on pandas-dev#16934 Fixes: pandas-dev#16934
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code Sample, a copy-pastable example if possible
Problem description
Sorting using a list for the
ascending
argument appears to have been implemented in #10905 but doesn't work in the above scenario. I get the following output:Expected Output
DataFrame sorted by index
third
descending then indexfirst
ascending:Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.0.final.0
python-bits: 64
OS: Darwin
OS-release: 16.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.20.2
pytest: None
pip: 9.0.1
setuptools: 35.0.1
Cython: None
numpy: 1.13.0
scipy: 0.19.0
xarray: None
IPython: 6.1.0
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: 3.4.2
numexpr: 2.6.2
feather: None
matplotlib: 2.0.0
openpyxl: None
xlrd: 1.0.0
xlwt: None
xlsxwriter: 0.9.6
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: 2.7.1 (dt dec pq3 ext lo64)
jinja2: None
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: