preprocessing.curate_data.basic_ts_checks

preprocessing.curate_data.basic_ts_checks(data, verbose=False)

Checks if the time series data has a datetime index and is sorted.

Parameters

Name Type Description Default
data pd.DataFrame The main dataset. required
verbose bool Whether to print additional information. False

Examples

>>> from spotforecast2_safe.data.fetch_data import fetch_data
>>> from spotforecast2_safe.preprocessing.curate_data import basic_ts_checks
>>> data = fetch_data()
>>> basic_ts_checks(data)

Raises

Name Type Description
TypeError If the index is not a datetime index.
ValueError If the datetime index is not sorted in increasing order or is incomplete.

Returns

Name Type Description
bool bool True if the datetime index is valid, sorted, and complete.