-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ZeroDivisionError when groupby on a empty group #22519
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
Comments
Indeed, that does look like a regression. cc @jreback |
Pardon my interruption, but this is blocking for 0.23 adoption on our side : any schedule on the resolution of this regression ? |
@AtomBaf : Thank you for the ping! I have marked it for our next minor release. |
if a patch is contributed it can be put on 0.23.5 but nothing is currently out there |
@gfyoung any timing on that next minor release? This bug is also causing me pain. |
@glennlawyer : Sorry to hear that! Unfortunately, I do not know when the next version will be released. If you are able to though, you could consider installing directly off |
Code Sample, a copy-pastable example if possible
Problem description
See code example above. The problem occurs only when pct parameter is True
Regression between 0.22 and 0.23.4.
Before 0.23, the result was a series with NaN values for each group containing only NaN values.
Now it is throwing a ZeroDivisionError
Expected Output
Same output as 0.22
Output of
pd.show_versions()
pandas: 0.23.4
pytest: None
pip: 18.0
setuptools: 40.2.0
Cython: None
numpy: 1.15.0
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.7.3
pytz: 2018.5
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: