ENH: increase verbosity on error #59659
Labels
Enhancement
Error Reporting
Incorrect or improved errors from pandas
Strings
String extension data type and string data
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
On a specific type error the error causing type is not logged in the error
Feature Description
By replacing:
raise AttributeError("Can only use .str accessor with string values!")
with
raise AttributeError(f"Can only use .str accessor with string values! Inferred dType: {inferred_dtype}")
the problem would be solved
Details can be found in here
Alternative Solutions
Use a debugger and set a break point
Additional Context
No response
The text was updated successfully, but these errors were encountered: