Skip to content

Series.mode has not a sort argument. #16053

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
arnau126 opened this issue Apr 19, 2017 · 1 comment
Closed

Series.mode has not a sort argument. #16053

arnau126 opened this issue Apr 19, 2017 · 1 comment

Comments

@arnau126
Copy link

Code Sample

import pandas as pd

s = pd.Series(['b', 'c', 'a', 'c', 'a', 'b', 'a'])
s.mode(sort=False)

traceback:

<ipython-input-4-a5ccd47afe9c> in <module>()
      1 s = pd.Series(['b', 'c', 'a', 'c', 'a', 'b', 'a'])
----> 2 s.mode(sort=False)

TypeError: mode() got an unexpected keyword argument 'sort'

Problem description

Pandas DOC for Series.mode says that this function has a sort argument.
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.mode.html

But looking at source code, I see that it is not true:
https://github.com/pandas-dev/pandas/blob/v0.19.2/pandas/core/series.py#L1220-L1237

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 2.7.12.final.0 python-bits: 64 OS: Linux OS-release: 4.8.0-46-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: ca_ES.UTF-8 LOCALE: None.None

pandas: 0.19.2
nose: 1.3.7
pip: 9.0.1
setuptools: 35.0.0
Cython: 0.25.2
numpy: 1.12.0
scipy: 0.18.1
statsmodels: 0.6.1
xarray: None
IPython: 5.3.0
sphinx: None
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2016.7
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: 2.4.1
xlrd: 1.0.0
xlwt: None
xlsxwriter: 0.7.3
lxml: None
bs4: None
html5lib: 0.999999999
httplib2: None
apiclient: None
sqlalchemy: 1.0.14
pymysql: 0.7.5.None
psycopg2: 2.7.1 (dt dec pq3 ext lo64)
jinja2: 2.9.6
boto: None
pandas_datareader: None

@arnau126
Copy link
Author

okay, I see that's already fixed: #14653

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant