KeySetsRepository#

from tmlt.synthetics import KeySetsRepository
class tmlt.synthetics.KeySetsRepository(keysets)#

Bases: object

A collection of possibly overlapping KeySets.

See the module docstring for more information.

join(dataframe, on)#

Returns a new KeySetsRepository by joining each keyset with dataframe.

Parameters:
  • dataframe (DataFrame) – DataFrame to join with each keyset.

  • on (List[str]) – List of columns to join on.

Return type:

KeySetsRepository

property columns: Set[str]#

Set of column names spanned by all KeySets in this repository.

__getitem__(columns)#

Returns a maximal KeySet with the given list of columns.

Parameters:

columns (List[str]) – List of columns that the KeySet should contain.

Return type:

KeySet