_OneSegmentLagTransform

class _OneSegmentLagTransform(in_column: str, lags: Union[List[int], int], out_column: Optional[str] = None)[source]

Bases: etna.transforms.base.Transform

Generates series of lags from given segment.

Inherited-members

Parameters
  • in_column (str) –

  • lags (Union[List[int], int]) –

  • out_column (Optional[str]) –

Methods

fit(*args)

Fit feature model.

fit_transform(df)

May be reimplemented.

inverse_transform(df)

Inverse transforms dataframe.

transform(df)

Transform dataframe.

fit(*args) etna.transforms.math.lags._OneSegmentLagTransform[source]

Fit feature model.

Should be implemented by user.

Parameters

df

Return type

etna.transforms.math.lags._OneSegmentLagTransform

transform(df: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame[source]

Transform dataframe.

Should be implemented by user

Parameters

df (pandas.core.frame.DataFrame) –

Return type

pandas.core.frame.DataFrame