sensortoolkit.datetime_utils._timeframe_utils.deploy_timestamp_index
- deploy_timestamp_index(df_obj, averaging_suffix=True)[source]
Create a timestamp index that spans the total duration of time during which sensors in an evaluation group were deployed.
Searches for the eariest and latest timestamp in sensor datasets and creates a datetime index at the indicated averaging interval spanning the time period of testing.
- Parameters
df_obj (either pandas dataframe or list of dataframes) – Sensor dataframe(s)
averaging_suffix (bool) – If true, a string suffix will be returned indicating the averaging interval of the passed dataframe object.
- Returns
One- or two-element tuple containing:
timestamp_idx (pandas DatetimeIndex): Index at either 1-hour or 24-hour averaging intervals spanning the entire evaluation period.
avg_suffix (str): If averaging_suffix is true, return suffix indicating the averaging interval of the timestamp index.
- Return type
(tuple)