datareactor.atoms.base module

Classes

Atom

Generate derived columns for a dataset.

class datareactor.atoms.base.Atom[source]

Bases: object

Generate derived columns for a dataset.

Each Atom is responsible for generating one or more derived columns for the target table.

Methods

derive(dataset, table_name)

Generate derived columns for the specified table.

transform(dataset)

Generate derived columns for the dataset.

derive(dataset, table_name)[source]

Generate derived columns for the specified table.

The derive function takes in a dataset and the name of the target column. It returns a list of derived columns which can be concatenated to the target table.

Parameters
  • dataset (Dataset) – The dataset.

  • table_name (str) – The name of the target table.

Returns

The derived columns.

Return type

(list of DerivedColumn)

transform(dataset)[source]

Generate derived columns for the dataset.

The transform function takes in a dataset and returns a sequence of derived columns.

Parameters

dataset (Dataset) – The dataset.

Returns

The derived columns.

Return type

(list of DerivedColumn)