-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Regression from 1.2.5 to 1.3.x: groupby using sum on DataFrame containing lists fails #43108
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
looks similar to #42395. change in behavior reported for non-numeric column |
I am new to OpenSource Projects . Can I work on this issue? |
The default for DataFrameGroupBy.sum's numeric_only is True according to the docstring (in the code it is lib.no_default for code-sharing). Failing to exclude non-numeric columns was a bug pre-1.3 |
Yeah I got that , I am working on the case when the dataframe has no numeric feature , but by default |
Yes, but based on the comment here: #42395 (comment) it seems that we might want to consider changing the default to have |
closing this to keep discussion in on place. |
Can I work on this issue. Perhaps come up with the contribute to code |
Thanks @Priyanshi-Chauhan. This issue is closed. Discussion on this issue now in #42395. There is an open PR to fix #43154. There are many other issues that could be worked on. I'd recommend any from https://github.com/pandas-dev/pandas/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+label%3A%22Needs+Tests%22 |
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Version 1.3.2:
Version 1.2.5:
Problem description
With 1.2.5 and earlier, if the elements of one of the columns are objects that are lists, then the
groupby
operation withsum
creates the aggregation of the lists. With 1.3.2, it doesn't.Expected Output
Same as 1.2.5
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 3af1a4f
python : 3.8.8.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19041
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_United States.1252
pandas : 1.4.0.dev0+475.g3af1a4fa27
numpy : 1.21.1
pytz : 2021.1
dateutil : 2.8.1
pip : 21.1.3
setuptools : 49.6.0.post20210108
Cython : 0.29.23
pytest : 6.2.4
hypothesis : 6.14.1
sphinx : 3.5.4
blosc : None
feather : None
xlsxwriter : 1.4.3
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.25.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.3.2
fsspec : 2021.05.0
fastparquet : 0.6.3
gcsfs : 2021.05.0
matplotlib : 3.3.3
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 2.0.0
pyxlsb : None
s3fs : 0.4.2
scipy : 1.7.0
sqlalchemy : 1.4.20
tables : 3.6.1
tabulate : 0.8.9
xarray : 0.18.2
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.52.0
The text was updated successfully, but these errors were encountered: