We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c04e30 commit a165278Copy full SHA for a165278
pandas/core/arrays/masked.py
@@ -870,8 +870,9 @@ def take(
870
# we only fill where the indexer is null
871
# not existing missing values
872
# TODO(jreback) what if we have a non-na float as a fill value?
873
- # NaN with uncertainties is scalar but does not register as `isna`, so use fact that NaN != NaN
874
- if allow_fill and notna(fill_value) and fill_value==fill_value:
+ # NaN with uncertainties is scalar but does not register as `isna`,
+ # so use fact that NaN != NaN
875
+ if allow_fill and notna(fill_value) and fill_value == fill_value:
876
fill_mask = np.asarray(indexer) == -1
877
result[fill_mask] = fill_value
878
mask = mask ^ fill_mask
0 commit comments