diff --git a/pandas/core/strings/accessor.py b/pandas/core/strings/accessor.py index 31fc78c2feb36..05e1a36877e06 100644 --- a/pandas/core/strings/accessor.py +++ b/pandas/core/strings/accessor.py @@ -256,7 +256,7 @@ def _validate(data): if inferred_dtype not in allowed_types: raise AttributeError( - f"Can only use .str accessor with string values!, not {inferred_dtype}" + f"Can only use .str accessor with string values, not {inferred_dtype}" ) return inferred_dtype