-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: apply std to groupby with as_index=False #16799
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
@indonoso As you already linked to those issues, I think this is a duplicate of #10355 (with the only difference here is that the "modifying key column" result in an error because it are strings, but the cause is the same). |
You probably know, but as reference, an easy work-around for now is not using
|
Thanks jorisvandenbossche, your suggestion worked for one of my friend who was having this particular issue. |
Hi, i hope its usefull :) here is the code i used: |
Code Sample, a copy-pastable example if possible
Problem description
The last line gives an
AtributeError
If the
as_index
is set toFalse
in thegroupby
operation, the sqrt is applied to all the columns, even to the columns that where used to group, which raises an error when at least one column is not numeric.This error is related to issues: #11300, #14547, #11507, #10355
Expected Output
Output of
pd.show_versions()
pandas: 0.20.2
pytest: None
pip: 9.0.1
setuptools: 36.0.1
Cython: 0.25.1
numpy: 1.13.0
scipy: 0.18.1
xarray: None
IPython: 5.1.0
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: 1.2.0
tables: None
numexpr: None
feather: None
matplotlib: 1.5.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: 0.7.3
lxml: None
bs4: 4.4.1
html5lib: 0.999
sqlalchemy: 1.1.5
pymysql: None
psycopg2: 2.6.2 (dt dec pq3 ext lo64)
jinja2: 2.8
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: