Pandas version checks
- [x] I have checked that the issue still exists on the latest versions of the docs on
main
here
Location of the documentation
https://pandas.pydata.org/docs/reference/api/pandas.to_numeric.html
Documentation problem
There is no "Raises" section that describes which errors are raised when setting the argument "errors" to "raise". It is not immediately clear if a conversion error will cause a TypeError or ValueError, or both depending on how conversion failed.
This would be useful when doing as recommended to "Catch exceptions explicitly instead.", and writing a try: except:
with specific errors caught to avoid an overly generic error-catch which is bad practice etc. etc.
Suggested fix for documentation
Add a "Raises:" section or include specific error names instead of the generic "Raises an exception".
See for example: https://numpy.org/doc/2.1/reference/generated/numpy.array.html
For False it raises a ValueError if a copy cannot be avoided. Default: True.
Comment From: renegade620
Hi, I'd like to pick this up as my first open source contribution.