DictMap#
- class polpo.preprocessing.dict.DictMap(step=None, pbar=False, key_step=None, special_keys=(), special_step=None)[source]#
Bases:
StepWrappingPreprocessingStep
Apply a given step to each element of a dictionary.
- Parameters:
step (callable) – Preprocessing step to apply to value.
pbar (bool) – Whether to show a progress bar.
key_step (callable) – Preprocessing step to apply to key.
special_keys (array-like) – Keys to be subject to a different step.
special_step (callable) – Step to apply to special keys.