Skip to content

Commit 65fde97

Browse files
committed
DOC: Clarify Series.eq behaviour with missing values
1 parent e0bd4d1 commit 65fde97

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandas/core/series.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3112,7 +3112,8 @@ def combine(
31123112
Function that takes two scalars as inputs and returns an element.
31133113
fill_value : scalar, optional
31143114
The value to assume when an index is missing from
3115-
one Series or the other. The default specifies to use the
3115+
one Series or the other. Scalars are any value that is not a numpy.ndarray,
3116+
list, tuple or Series. The default specifies to use the
31163117
appropriate NaN value for the underlying dtype of the Series.
31173118
31183119
Returns
@@ -6073,6 +6074,11 @@ def eq(
60736074
Equivalent to ``series == other``, but with support to substitute a fill_value
60746075
for missing data in either one of the inputs.
60756076
6077+
By default, comparisons with missing values (e.g. ``np.nan``, ``pd.NA``) will
6078+
return ``False`` for those positions, even when comparing missing values to
6079+
themselves. If ``fill_value`` is specified, missing values are replaced before
6080+
comparison.
6081+
60766082
Parameters
60776083
----------
60786084
other : Series or scalar value

0 commit comments

Comments
 (0)