Skip to content

Commit c210f8b

Browse files
authored
[test-upstream] fix pd skipna=None (#5899)
1 parent b3b77f5 commit c210f8b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

xarray/tests/test_duck_array_ops.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ def from_series_or_scalar(se):
258258
def series_reduce(da, func, dim, **kwargs):
259259
"""convert DataArray to pd.Series, apply pd.func, then convert back to
260260
a DataArray. Multiple dims cannot be specified."""
261+
262+
# pd no longer accepts skipna=None https://github.com/pandas-dev/pandas/issues/44178
263+
if kwargs.get("skipna", True) is None:
264+
kwargs["skipna"] = True
265+
261266
if dim is None or da.ndim == 1:
262267
se = da.to_series()
263268
return from_series_or_scalar(getattr(se, func)(**kwargs))

0 commit comments

Comments
 (0)