Skip to content

Commit 86488f7

Browse files
authored
WARN: Improve deprecation message (#56541)
1 parent 9a08863 commit 86488f7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/frame.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5227,8 +5227,9 @@ def _sanitize_column(self, value) -> tuple[ArrayLike, BlockValuesRefs | None]:
52275227
# TODO: Remove kludge in sanitize_array for string mode when enforcing
52285228
# this deprecation
52295229
warnings.warn(
5230-
"Setting an Index with object dtype into a DataFrame will no longer "
5231-
"infer another dtype. Cast the Index explicitly before setting.",
5230+
"Setting an Index with object dtype into a DataFrame will stop "
5231+
"inferring another dtype in a future version. Cast the Index "
5232+
"explicitly before setting it into the DataFrame.",
52325233
FutureWarning,
52335234
stacklevel=find_stack_level(),
52345235
)

0 commit comments

Comments
 (0)