Skip to content

increase verbosity #59649

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 1 commit into from
Closed

Conversation

romeokienzler
Copy link

@romeokienzler romeokienzler commented Aug 29, 2024

increase verbosity of error message by including the type causing the error in the error message

increase verbosity of error message by including the type causing the error in the error message
@mroeschke
Copy link
Member

Is this PR associated with an issue?

@romeokienzler
Copy link
Author

@mroeschke I've opened one now #59659

@@ -252,7 +252,7 @@ def _validate(data):
inferred_dtype = lib.infer_dtype(values, skipna=True)

if inferred_dtype not in allowed_types:
raise AttributeError("Can only use .str accessor with string values!")
raise AttributeError(f"Can only use .str accessor with string values! Inferred dType: {inferred_dtype}")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
raise AttributeError(f"Can only use .str accessor with string values! Inferred dType: {inferred_dtype}")
raise AttributeError(f"Can only use .str accessor with string values, not {inferred_dtype}.")

@mroeschke mroeschke added the Error Reporting Incorrect or improved errors from pandas label Aug 30, 2024
@KevsterAmp
Copy link
Contributor

can I re-open a new PR regarding this? seems like this PR has become stale

@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: increase verbosity on error
3 participants