Skip to content

Commit

Permalink
Backport PR pandas-dev#56699 on branch 2.2.x (DOC: Corrected typo in …
Browse files Browse the repository at this point in the history
…warning on coerce) (pandas-dev#56719)

Backport PR pandas-dev#56699: DOC: Corrected typo in warning on coerce

Co-authored-by: aaron-robeson-8451 <[email protected]>
  • Loading branch information
meeseeksmachine and aaron-robeson-8451 authored Jan 3, 2024
1 parent d43af63 commit 341939a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v2.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ In a future version, these will raise an error and you should cast to a common d
In [3]: ser[0] = 'not an int64'
FutureWarning:
Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas.
Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas.
Value 'not an int64' has dtype incompatible with int64, please explicitly cast to a compatible dtype first.
In [4]: ser
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/internals/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def coerce_to_target_dtype(self, other, warn_on_upcast: bool = False) -> Block:
if warn_on_upcast:
warnings.warn(
f"Setting an item of incompatible dtype is deprecated "
"and will raise in a future error of pandas. "
"and will raise an error in a future version of pandas. "
f"Value '{other}' has dtype incompatible with {self.values.dtype}, "
"please explicitly cast to a compatible dtype first.",
FutureWarning,
Expand Down

0 comments on commit 341939a

Please sign in to comment.