Skip to content
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

Request: Better error message for missing columns in aggregate #32755

Closed
tsoernes opened this issue Mar 16, 2020 · 2 comments · Fixed by #32836
Closed

Request: Better error message for missing columns in aggregate #32755

tsoernes opened this issue Mar 16, 2020 · 2 comments · Fixed by #32836
Labels
Error Reporting Incorrect or improved errors from pandas good first issue
Milestone

Comments

@tsoernes
Copy link

When attempting to aggregate a non-existing column, this error is raised, which is not very descriptive: SpecificationError: nested renamer is not supported

In [39]: pd.DataFrame([[1, 2]], columns=['A', 'B']).groupby('A').agg({'B': 'mean'})
Out[39]: 
   B
A   
1  2

In [40]: pd.DataFrame([[1, 2]], columns=['A', 'B']).groupby('A').agg({'B': 'mean', 'non-existing': 'mean'})
Out[40]:
...
SpecificationError: nested renamer is not supported
@MarcoGorelli
Copy link
Member

Thanks @tsoernes - do you want to work on a pull request? https://pandas.pydata.org/docs/development/contributing.html

@tsoernes
Copy link
Author

I'm sorry but I'm unable to contribute at this moment.

@jbrockmendel jbrockmendel added the Error Reporting Incorrect or improved errors from pandas label Mar 19, 2020
@MarcoGorelli MarcoGorelli added this to the Contributions Welcome milestone Mar 19, 2020
@jreback jreback modified the milestones: Contributions Welcome, 1.1 Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants