Skip to content

ENH: increase verbosity on error #59659

@romeokienzler

Description

@romeokienzler

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

Metadata

Metadata

Assignees

Labels

EnhancementError ReportingIncorrect or improved errors from pandasStringsString extension data type and string data

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions