Skip to content

ENH: Make categories setitem error more readable #47624

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

Closed
wants to merge 3 commits into from

Conversation

siddartha-10
Copy link

@siddartha-10 siddartha-10 commented Jul 7, 2022

Closes #46646

@pep8speaks
Copy link

pep8speaks commented Jul 7, 2022

Hello @siddartha-10! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 1477:29: W291 trailing whitespace
Line 1478:13: E122 continuation line missing indentation or outdented
Line 1478:58: W291 trailing whitespace
Line 1479:13: E122 continuation line missing indentation or outdented
Line 1479:65: W291 trailing whitespace

Comment last updated at 2022-07-07 12:27:07 UTC

Copy link
Member

@mzeitlin11 mzeitlin11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pr @siddartha-10. Can you please explain the rationale behind this change? Is there a related issue?

@mzeitlin11 mzeitlin11 added Categorical Categorical Data Type Needs Info Clarification about behavior needed to assess issue labels Jul 7, 2022
@siddartha-10
Copy link
Author

Thanks for the pr @siddartha-10. Can you please explain the rationale behind this change? Is there a related issue?

Yes @mzeitlin11 There is a issue #46646. Before this it was showing lot of error statements after this it just shows a few of them I believe

@mzeitlin11
Copy link
Member

Yes @mzeitlin11 There is a issue #46646. Before this it was showing lot of error statements after this it just shows a few of them I believe

Thanks. Can you please add a test showing how this fixes the issue in #46646. See https://pandas.pydata.org/docs/development/contributing.html for some guidance on how to add a test. Looks like there is also a linting error, please see https://pandas.pydata.org/docs/development/contributing_codebase.html#pre-commit for how to fix that

@mzeitlin11 mzeitlin11 added Error Reporting Incorrect or improved errors from pandas and removed Needs Info Clarification about behavior needed to assess issue labels Jul 7, 2022
@mzeitlin11 mzeitlin11 changed the title Update categorical.py ENH: Make categories setitem error more readable Jul 7, 2022
f"category ({fill_value}), set the categories first"
)
raise TypeError(
"Cannot setitem on a Categorical with a new "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An intendation is missing here

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2022

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Aug 9, 2022
@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. We have another active contribution in #48087, so closing in favor.

@mroeschke mroeschke closed this Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Error Reporting Incorrect or improved errors from pandas Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Make categories setitem error more readable
6 participants