xarray.DataArray.pr.fill_all_na

DataArray.pr.fill_all_na(dim: Iterable[Hashable] | str, value=0) DataArray

Fill NA values only where all values along the specified dimension(s) are NA.

Example: having a data array with dimensions time and position, filling it along time will only fill those values where all points that differ only in their time are NA, i.e. those points where all points with the same position are NA.

Parameters:
dim: str or list of str

Dimension(s) to evaluate. NA values are only filled if all values along these dimension(s) are also NA.

value: optional

Fill value to use. Default: 0.

Returns:
filledxr.DataArray