xarray.Dataset.bfill#

Dataset.bfill(dim, limit=None)[source]#

Fill NaN values by propagating values backward

Requires bottleneck.

Parameters:
  • dim (Hashable) – Specifies the dimension along which to propagate values when filling.

  • limit (int or None, optional) – The maximum number of consecutive NaN values to backward fill. In other words, if there is a gap with more than this number of consecutive NaNs, it will only be partially filled. Must be greater than 0 or None for no limit. Must be None or greater than or equal to axis length if filling along chunked axes (dimensions).

Returns:

Dataset