We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06562a6 commit 339e2aaCopy full SHA for 339e2aa
pandas/core/nanops.py
@@ -300,11 +300,8 @@ def _get_values(
300
dtype, fill_value=fill_value, fill_value_typ=fill_value_typ
301
)
302
303
- copy = (mask is not None) and (fill_value is not None)
304
-
305
- if skipna and copy:
+ if skipna and (mask is not None) and (fill_value is not None):
306
values = values.copy()
307
- assert mask is not None # for mypy
308
if dtype_ok and mask.any():
309
np.putmask(values, mask, fill_value)
310
0 commit comments