Skip to content

Dataframe Groupby with Quantile Can't handle q=tuple #28285

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
ahowe42 opened this issue Sep 4, 2019 · 3 comments
Closed

Dataframe Groupby with Quantile Can't handle q=tuple #28285

ahowe42 opened this issue Sep 4, 2019 · 3 comments

Comments

@ahowe42
Copy link

ahowe42 commented Sep 4, 2019

In version 0.24.1, a groupby with quantile(q), where q is a tuple works. However, with 0.25, a TypeErr exception is thrown. This works as expected:

pd.DataFrame([[0,1,2,3],[0,4,5,6],[1,7,8,9],[1,10,11,12]],columns=['a','b','c','d']).quantile((0.01,0.99))

but this does not:

pd.DataFrame([[0,1,2,3],[0,4,5,6],[1,7,8,9],[1,10,11,12]],columns=['a','b','c','d']).groupby(by=['a']).b.quantile((0.01,0.99))

Output of pd.show_versions()

INSTALLED VERSIONS

commit : None
python : 3.7.3.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None

pandas : 0.25.0
numpy : 1.16.4
pytz : 2019.1
dateutil : 2.8.0
pip : 19.1.1
setuptools : 41.0.1
Cython : 0.29.12
pytest : 5.0.1
hypothesis : None
sphinx : 2.1.2
blosc : None
feather : None
xlsxwriter : 1.1.8
lxml.etree : 4.3.4
html5lib : 1.0.1
pymysql : None
psycopg2 : 2.7.6.1 (dt dec pq3 ext lo64)
jinja2 : 2.10.1
IPython : 7.7.0
pandas_datareader: None
bs4 : 4.7.1
bottleneck : 1.2.1
fastparquet : None
gcsfs : None
lxml.etree : 4.3.4
matplotlib : 3.1.0
numexpr : 2.6.9
odfpy : None
openpyxl : 2.6.2
pandas_gbq : None
pyarrow : None
pytables : None
s3fs : None
scipy : 1.3.0
sqlalchemy : 1.3.5
tables : 3.5.2
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.1.8

@WillAyd
Copy link
Member

WillAyd commented Sep 4, 2019

Can you try on master? I think this is a duplicate of something already fixed

@badge
Copy link

badge commented Sep 4, 2019

Fixed in 0.25.1

#27526

@TomAugspurger
Copy link
Contributor

Thanks for checking.

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

4 participants