Normals#
- class Normals(*, table_name: TimeseriesTableNamesEnum = TimeseriesTableNamesEnum.primary_timeseries, filters: str | dict | TableFilter | List[str | dict | TableFilter] = None, temporal_resolution: NormalsResolutionEnum = NormalsResolutionEnum.day_of_year, summary_statistic: NormalsStatisticEnum = NormalsStatisticEnum.mean, df: DataFrame = None)[source]#
Model for generating synthetic normals timeseries.
- Parameters:
temporal_resolution (
NormalsResolutionEnum) – The temporal resolution for the normals timeseries.summary_statistic (
NormalsStatisticEnum) – The summary statistic to use for the normals timeseries.df (
ps.DataFrame) – The DataFrame containing the timeseries data.
Methods
Generate synthetic normals timeseries.
Attributes
model_computed_fieldsmodel_configConfiguration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_extraGet extra fields set during validation.
model_fieldsmodel_fields_setReturns the set of fields that have been explicitly set on this model instance.
temporal_resolutionsummary_statisticdftable_namefilters- generate(input_dataframe: DataFrame, output_dataframe: DataFrame, fillna: bool, dropna: bool) DataFrame[source]#
Generate synthetic normals timeseries.
- Parameters:
input_dataframe (
ps.DataFrame) – The input DataFrame containing the timeseries data.output_dataframe (
ps.DataFrame) – The output DataFrame to join the normals data to.fillna (
bool) – Whether to fill NaN values using forward and backward fill.dropna (
bool) – Whether to drop rows with NaN values.
- Returns:
ps.DataFrame– The DataFrame containing the generated normals timeseries.