pecos.utils.round_index module¶
-
pecos.utils.round_index.round_index(dt, frequency, how='nearest')[source]¶ Round datetime index
Parameters: dt : DatetimeIndex
Time series index
frequency : int
Expected timeseries frequency, in seconds
how : string (default = ‘nearest’)
Method for rounding. Options include:
- nearest = round the index to the nearest expected integer
- floor= round the index to the largest expected integer such that the integer <= index
- ceiling = round the index to the smallest expected integer such that the integer >= index
Returns: rounded _dt : DatetimeIndex
Rounded time series index