etna.datasets.generate_const_df#

generate_const_df(periods: int, start_time: ~pandas._libs.tslibs.timestamps.Timestamp | int | str | None = None, scale: float = 10, n_segments: int = 1, freq: ~pandas._libs.tslibs.offsets.DateOffset | str | None = <Day>, add_noise: bool = False, sigma: float = 1, random_seed: int = 1) DataFrame[source]#

Create DataFrame with const data.

Parameters:
  • periods (int) – number of timestamps

  • start_time (Timestamp | int | str | None) – start timestamp

  • scale (float) – const value to fill

  • n_segments (int) – number of segments

  • freq (DateOffset | str | None) –

    frequency of timestamps, possible values:

    • pandas.DateOffset object for datetime timestamp

    • pandas offset aliases for datetime timestamp

    • None for integer timestamp

  • add_noise (bool) – if True we add noise to final samples

  • sigma (float) – scale of added noise

  • random_seed (int) – random seed

Raises:

ValueError: – Non-integer timestamp parameter is used for integer-indexed timestamp.

Return type:

DataFrame