sktime.transformations.panel.padder

class sktime.transformations.panel.padder.PaddingTransformer(pad_length=None, fill_value=0)[source]

Bases: sktime.transformations.base._PanelToPanelTransformer

PaddingTransformer docstring

Pads the input dataset to either a optional fixed length (longer than the longest series). Or finds the max length series across all series and dimensions and pads to that with zeroes.

Parameters

pad_length (int, optional (default=None) length to pad the series too.) – if None, will find the longest sequence and use instead.

fit(X, y=None)[source]

Fit transformer.

Parameters
  • X (pandas DataFrame of shape [n_samples, n_features]) – Input data

  • y (pandas Series, shape (n_samples, ..), optional) – Targets for supervised learning.

Returns

self

Return type

an instance of self.

transform(X, y=None)[source]

Transform X.

Parameters

X (nested pandas DataFrame of shape [n_instances, n_columns]) – Nested dataframe with time-series in cells.

Returns

Xt

Return type

pandas DataFrame