energy_analysis_toolbox.load_profiles.mean_profile module#

Defines a base class to compute average load profiles from history.

class energy_analysis_toolbox.timeseries.profiles.mean_profile.MeanProfile(period: str = 'D', *, is_max: bool = True, window: int = 1)[source]#

Bases: object

A class which computes a simple mean profile.

compute(history: Series, time: Timestamp) Series[source]#

Return an averaged profile.

Parameters:
  • history (pd.Series) – Consumption history used to computed the reference profile. The history should be sampled homogeneously during the aggregated periods.

  • time (pd.Timestamp) – The time at which the profile is of interest. Only the information about the date floored to self.period is used in the passed timestamp.

Returns:

profile (pd.Series) – Profile threshold with same resolution as the history data.

Notes

The profile threshold is obtained as the mean profile obtained from history.

group(history: Series | DataFrame) GroupBy[source]#

Group history data by chunks of self.period.

Parameters:

history (pd.Series or pd.DataFrame)

Returns:

pd.core.groupby.GroupBy