Skip to content

DOC: pandas.Index.astype says it raises ValueError instead of TypeError #37012

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
coelhudo opened this issue Oct 9, 2020 · 0 comments · Fixed by #37013
Closed

DOC: pandas.Index.astype says it raises ValueError instead of TypeError #37012

coelhudo opened this issue Oct 9, 2020 · 0 comments · Fixed by #37013
Labels

Comments

@coelhudo
Copy link
Contributor

coelhudo commented Oct 9, 2020

Location of the documentation

The documentation is located at https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Index.astype.html

Documentation problem

The documentation says " When conversion is impossible, a ValueError exception is raised." However, checking the code it can be seen that a TypeError is raised instead of ValueError.

Suggested fix for documentation

Just change ValueError to TypeError in the docstring.

@coelhudo coelhudo added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 9, 2020
@dsaxton dsaxton removed the Needs Triage Issue that has not been reviewed by a pandas team member label Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants