Backward fill new values at up-sampled frequency. Parameters ---------- tolerance : float | Iterable[float] | str | None, default: None Maximum distance between original and new labels to limit the up-sampling method. Up-sampled data with
(
self, tolerance: float | Iterable[float] | str | None = None
)
| 155 | ffill = pad |
| 156 | |
| 157 | def backfill( |
| 158 | self, tolerance: float | Iterable[float] | str | None = None |
| 159 | ) -> T_Xarray: |
| 160 | """Backward fill new values at up-sampled frequency. |
| 161 | |
| 162 | Parameters |
| 163 | ---------- |
| 164 | tolerance : float | Iterable[float] | str | None, default: None |
| 165 | Maximum distance between original and new labels to limit |
| 166 | the up-sampling method. |
| 167 | Up-sampled data with indices that satisfy the equation |
| 168 | ``abs(index[indexer] - target) <= tolerance`` are filled by |
| 169 | new values. Data with indices that are outside the given |
| 170 | tolerance are filled with ``NaN`` s. |
| 171 | |
| 172 | Returns |
| 173 | ------- |
| 174 | backfilled : DataArray or Dataset |
| 175 | """ |
| 176 | obj = self._drop_coords() |
| 177 | (grouper,) = self.groupers |
| 178 | return obj.reindex( |
| 179 | {self._dim: grouper.full_index}, method="backfill", tolerance=tolerance |
| 180 | ) |
| 181 | |
| 182 | bfill = backfill |
| 183 |
nothing calls this directly
no test coverage detected