pastas.timeseries.validate_oseries#
- pastas.timeseries.validate_oseries(series: pandas.Series)#
Method to validate user-provided oseries input time series.
- Parameters:
series (pandas.Series) – Pandas.Series object containing the series time series.
- Returns:
True if the series is valid. If not, an error is raised.
- Return type:
Notes
The Series are validated for the following cases:
Make sure the series is a Pandas.Series
Make sure the values are floats
Make sure the index is a DatetimeIndex
Make sure the indices are datetime64 (and tz naive)
Make sure the index has no NaT-values
Make sure the index is monotonically increasing
Make sure there are no duplicate indices
Make sure the time series has no nan-values
If any of these checks are not passed the method will throw an error that needs to be fixed by the user.
Examples
>>> ps.validate_oseries(series)