energy_analysis_toolbox.load_profiles.preprocessing.history_filters.weekdays module#
Filter history data based on day of week.
- energy_analysis_toolbox.timeseries.profiles.preprocessing.history_filters.weekdays.same_day_only(history: DataFrame, date: Timestamp | None = None) DataFrame[source]#
Return the same days of week in history n_days before date.
- Parameters:
history (pd.DataFrame) – History data to be filtered. It is expected that the data is time-indexed, with monotonic-increasing labels.
date (pd.Timestamp, optional) – Reference for which the day-of-week should be the same in history. In case
Noneis passed, the day after the one of the last entry in history is used.
- Returns:
pd.DataFrame – Input history in which only the entries for which the day in the week is the same as
datehave been conserved.
- energy_analysis_toolbox.timeseries.profiles.preprocessing.history_filters.weekdays.weekdays_only(history: DataFrame) DataFrame[source]#
Return the weekdays in history.
- Parameters:
history (pd.DataFrame) – History data to be filtered. It is expected that the data is time-indexed, with monotonic-increasing labels.
- Returns:
pd.DataFrame – Input history from which all weekends entry have been removed.
- energy_analysis_toolbox.timeseries.profiles.preprocessing.history_filters.weekdays.weekends_only(history: DataFrame) DataFrame[source]#
Return the weekends in history.
- Parameters:
history (pd.DataFrame) – History data to be filtered. It is expected that the data is time-indexed, with monotonic-increasing labels.
- Returns:
pd.DataFrame – Input history from which all weekdays entry have been removed.