You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to group by a particular level in a dataframe with multi-indexed columns. In particular, I want to use the quantile function. It looks like quantile breaks for columns but not for rows, and other functions like mean work fine.
/Users/lev/miniconda2/envs/cmappy/lib/python2.7/site-packages/pandas/core/groupby.pyc in _aggregate_item_by_item(self, func, *args, **kwargs)
3554 # GH6337
3555 if not len(result_columns) and errors is not None:
-> 3556 raise errors
3557
3558 return DataFrame(result, columns=result_columns)
TypeError: quantile() got an unexpected keyword argument 'numeric_only'
Seems to work for me on master, are you able to check? We have a release candidate out right now, so pip install --upgrade --pre pandas or conda install -c conda-forge/label/rc pandas
I can reproduce this issue with Python 2.x but not with Python 3.x. Also, this problem is still prevalent on the RC. The problem seems to be traced to a wrapper call somewhere in groupby.py.
This works in Python3, and we've dropped support for python2. Without a reproducible error on Python3, I don't think we can do much more with this. So I'm closing.
I am trying to group by a particular level in a dataframe with multi-indexed columns. In particular, I want to use the
quantile
function. It looks likequantile
breaks for columns but not for rows, and other functions likemean
work fine.Calling
quantile
on the columns breaks:But
mean
works okay:Transposing fixes the problem:
Expected Output
The expected output is the last result above, but it'd be nice not to have to transpose and then to re-transpose to get it to work.
Thank you very much for all your good work!
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.13.final.0
python-bits: 64
OS: Darwin
OS-release: 16.7.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.20.3
pytest: None
pip: 9.0.1
setuptools: 33.1.1.post20170320
Cython: None
numpy: 1.12.1
scipy: 0.19.0
xarray: None
IPython: 5.4.1
sphinx: None
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.5
s3fs: None
pandas_gbq: None
pandas_datareader: None
None
The text was updated successfully, but these errors were encountered: