Skip to content

Commit 23a1085

Browse files
authored
BUG: improve future warning for boolean operations with missaligned indexes (#62367)
1 parent 6113696 commit 23a1085

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/core/series.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6169,9 +6169,11 @@ def _align_for_op(self, right, align_asobject: bool = False):
61696169
np.bool_,
61706170
):
61716171
warnings.warn(
6172-
"Operation between non boolean Series with different "
6173-
"indexes will no longer return a boolean result in "
6174-
"a future version. Cast both Series to object type "
6172+
"Operation between Series with different indexes "
6173+
"that are not of numpy boolean or object dtype "
6174+
"will no longer return a numpy boolean result "
6175+
"in a future version. "
6176+
"Cast both Series to object type "
61756177
"to maintain the prior behavior.",
61766178
FutureWarning,
61776179
stacklevel=find_stack_level(),

0 commit comments

Comments
 (0)