-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Cannot do agg if dataframe has column "name" #24915
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
I think I found the issue. Mainly because:
My suggestion would be in step 3,4 (pandas.core.base.py line 543) apply additional rule to get "name" from self. Any comment is welcome! |
Getting the same result on master. @youhealthy a pull request with that change is welcome! |
@mroeschke thank you! PR submitted. |
Was fixed by #36224, maybe add a test? I am not sure if this is exactly the same case |
this is the same case as #36212 |
Code Sample, a copy-pastable example if possible
Problem description
If a dataframe has a column which is called "name", doing aggregation on the dataframe will cause RuntimeError.
But if the column is not called "name" but with some variant like "name0", "name_", it runs good.
Expected Output
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit: None
python: 2.7.15.final.0
python-bits: 64
OS: Darwin
OS-release: 18.0.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.23.4
pytest: None
pip: 18.1
setuptools: 40.6.3
Cython: None
numpy: 1.16.0
scipy: 1.2.0
pyarrow: 0.11.1
xarray: None
IPython: 5.8.0
sphinx: None
patsy: None
dateutil: 2.7.3
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: 1.1.0
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.9999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: 0.2.0
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: