-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REGR: Assertion error in 1.2.1 but not 1.0.5 with groupby, resample, min #39329
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
Thanks @mcarans for the report.
first bad commit: [0e199f3] REF: simplify _cython_agg_blocks (#35841) cc @jbrockmendel |
FWIW, I updated to pandas=1.2.3 today and am still having errors with df.groupby([...]).max() I rolled back to a legacy version (pandas=0.24.1) that I wrote my original code with, and the issues disappeared. Here's the last error block in version 1.2.3:
When I looked at my groupby() dataframe, it wasn't actually grouped and df.head(x) produced a full dataframe output (not a head). Nonetheless, the .max() aggregator seemed to correctly resolve it in pandas=0.24.1 but not in the current version. If there is an ongoing issue here, I think it may be related to df.groupby() being too permissive about data fidelity... it's passing weird data to the aggregator extensions. The underlying issue is probably groupby() allowing messy data input and passing it to aggregator handlers in unexpected ways. Sorry that I don't have data to share or bandwidth to open a new issue at the moment. Just be aware that groupby() has weird behavior and that these aggregation errors are likely a side effect of that. I hope this helps somehow, anyway. |
Thanks for the comment. If you get a chance to open a new issue at some point with a reproducible code sample then there is a greater chance that someone will take a look. |
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
When running it in 1.21 it fails with:
That exception is raised from another:
Expected Output
When running the above code in 1.05 it works without error.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 9d598a5
python : 3.8.5.final.0
python-bits : 64
OS : Linux
OS-release : 5.8.0-40-generic
Version : #45~20.04.1-Ubuntu SMP Fri Jan 15 11:35:04 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_NZ.UTF-8
LOCALE : en_NZ.UTF-8
pandas : 1.2.1
numpy : 1.19.4
pytz : 2020.5
dateutil : 2.8.1
pip : 20.3.3
setuptools : 51.1.1
Cython : None
pytest : 6.2.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : 1.1
pymysql : None
psycopg2 : 2.8.6 (dt dec pq3 ext lo64)
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : 3.0.5
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 1.3.22
tables : None
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: