MCPcopy Index your code
hub / github.com/pydata/xarray / floor

Method floor

xarray/coding/cftimeindex.py:732–747  ·  view source on GitHub ↗

Round dates down to fixed frequency. Parameters ---------- freq : str The frequency level to round the index to. Must be a fixed frequency like 'S' (second) not 'ME' (month end). See `frequency aliases <https://pandas.pydata.org/pandas-d

(self, freq)

Source from the content-addressed store, hash-verified

730 return _cftimeindex_from_i8(rounded, self.date_type, self.name)
731
732 def floor(self, freq):
733 """Round dates down to fixed frequency.
734
735 Parameters
736 ----------
737 freq : str
738 The frequency level to round the index to. Must be a fixed
739 frequency like 'S' (second) not 'ME' (month end). See `frequency
740 aliases <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`_
741 for a list of possible values.
742
743 Returns
744 -------
745 CFTimeIndex
746 """
747 return self._round_via_method(freq, _floor_int)
748
749 def ceil(self, freq):
750 """Round dates up to fixed frequency.

Callers

nothing calls this directly

Calls 1

_round_via_methodMethod · 0.95

Tested by

no test coverage detected