Forward 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 i
(self, tolerance: float | Iterable[float] | str | None = None)
| 130 | return obj |
| 131 | |
| 132 | def pad(self, tolerance: float | Iterable[float] | str | None = None) -> T_Xarray: |
| 133 | """Forward fill new values at up-sampled frequency. |
| 134 | |
| 135 | Parameters |
| 136 | ---------- |
| 137 | tolerance : float | Iterable[float] | str | None, default: None |
| 138 | Maximum distance between original and new labels to limit |
| 139 | the up-sampling method. |
| 140 | Up-sampled data with indices that satisfy the equation |
| 141 | ``abs(index[indexer] - target) <= tolerance`` are filled by |
| 142 | new values. Data with indices that are outside the given |
| 143 | tolerance are filled with ``NaN`` s. |
| 144 | |
| 145 | Returns |
| 146 | ------- |
| 147 | padded : DataArray or Dataset |
| 148 | """ |
| 149 | obj = self._drop_coords() |
| 150 | (grouper,) = self.groupers |
| 151 | return obj.reindex( |
| 152 | {self._dim: grouper.full_index}, method="pad", tolerance=tolerance |
| 153 | ) |
| 154 | |
| 155 | ffill = pad |
| 156 |
nothing calls this directly
no test coverage detected