Skip to content

Commit 0d4d8c3

Browse files
committed
fix(series): improve future warning
This change makes the warning more explicit about data types, where it clearly states that are talking about boolean numpy backend or object dtype. Also clearly states that it returns a numpy boolean series.
1 parent 4665c10 commit 0d4d8c3

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
@@ -6161,9 +6161,11 @@ def _align_for_op(self, right, align_asobject: bool = False):
61616161
np.bool_,
61626162
):
61636163
warnings.warn(
6164-
"Operation between non boolean Series with different "
6165-
"indexes will no longer return a boolean result in "
6166-
"a future version. Cast both Series to object type "
6164+
"Operation between Series with different indexes "
6165+
"that are not of numpy boolean or object dtype "
6166+
"will no longer return a numpy boolean result "
6167+
"in a future version. "
6168+
"Cast both Series to object type "
61676169
"to maintain the prior behavior.",
61686170
FutureWarning,
61696171
stacklevel=find_stack_level(),

0 commit comments

Comments
 (0)