cyto_dl.dataframe.transforms.group_cols module#

class cyto_dl.dataframe.transforms.group_cols.GroupCols(groups: Dict[str, str | Dict | None], dtypes: Dict[str, dtype | type | str | None] | None = None)[source]#

Bases: Transform

Parameters:
  • groups (Dict[str, Optional[Union[str, Dict]]]) – Dictionary where keys are column group names (which become batch keys) and values are either: - a dictionary containing the kwargs to be used in a col to filter_cols - a string, to use a single column in that group - None, to use a single column, with the same name as the key

  • dtypes (Dict[str, Optional[Union[str, np.dtype]]],) – Dictionary where keys are column group names (as in groups), and values are either: - a numpy dtype or python type - a string recognize by np.dtype that can be turned into a dtype - None in which case the dtype of the group remains as-is