Skip to content

Series sort_index missing kind keyword #14444

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

Closed
numerical opened this issue Oct 17, 2016 · 2 comments
Closed

Series sort_index missing kind keyword #14444

numerical opened this issue Oct 17, 2016 · 2 comments
Labels
Duplicate Report Duplicate issue or pull request Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Comments

@numerical
Copy link

A small, complete example of the issue

>>> import pandas as pd
>>> pd.Series(index=[3,2,1,4,3]).sort_index(kind='mergesort')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: sort_index() got an unexpected keyword argument 'kind'

Expected Output

A Series sorted by the index, i.e.:

>>> pd.Series(index=[3,2,1,4,3]).sort_index()
1   NaN
2   NaN
3   NaN
3   NaN
4   NaN
dtype: float64

Output of pd.show_versions()

## INSTALLED VERSIONS

commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-42-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.18.1
nose: 1.3.1
pip: 1.5.4
setuptools: 3.3
Cython: 0.20.1post0
numpy: 1.11.0
scipy: 0.13.3
statsmodels: None
xarray: None
IPython: 1.2.1
sphinx: 1.2.2
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.3.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: 0.8.7
lxml: None
bs4: 4.4.1
html5lib: 0.999
httplib2: 0.8
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.7.2
boto: None
pandas_datareader: None

@brandonmburroughs
Copy link
Contributor

It looks like we use _nargsort in DataFrame (relevant code), but sort_values in Series (relevant code). We can update sort_index in Series to follow the same pattern.

@jreback
Copy link
Contributor

jreback commented Oct 17, 2016

a dupe of #13589

@jreback jreback closed this as completed Oct 17, 2016
@jreback jreback added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Duplicate Report Duplicate issue or pull request labels Oct 19, 2016
@jorisvandenbossche jorisvandenbossche added this to the No action milestone Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Report Duplicate issue or pull request Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

No branches or pull requests

4 participants