We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 912293a commit 9107624Copy full SHA for 9107624
pandas/core/strings/accessor.py
@@ -255,7 +255,9 @@ def _validate(data):
255
inferred_dtype = lib.infer_dtype(values, skipna=True)
256
257
if inferred_dtype not in allowed_types:
258
- raise AttributeError("Can only use .str accessor with string values!")
+ raise AttributeError(
259
+ f"Can only use .str accessor with string values!, not {inferred_dtype}"
260
+ )
261
return inferred_dtype
262
263
def __getitem__(self, key):
0 commit comments