diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py index d8c58d1eaf4c7..c0ac9098ec7fc 100644 --- a/pandas/core/dtypes/cast.py +++ b/pandas/core/dtypes/cast.py @@ -1590,7 +1590,7 @@ def try_timedelta(v: np.ndarray) -> np.ndarray: warnings.warn( f"Inferring {value.dtype} from data containing strings is deprecated " "and will be removed in a future version. To retain the old behavior " - "explicitly pass Series(data, dtype={value.dtype})", + f"explicitly pass Series(data, dtype={value.dtype})", FutureWarning, stacklevel=find_stack_level(), )