Formatting
ColumnUpdater
¶
Bases: LocalStep
Simple class to create new columns from existing columns in a dataset. Existing columns are not modified.
Parameters:
-
keys_mapping(dict) –Dictionary with "from:to" mapping.
Source code in ragfit/processing/local_steps/formatting.py
FlattenList
¶
Bases: LocalStep
Class to join a list of strings into a single string.
Source code in ragfit/processing/local_steps/formatting.py
__init__(input_key, output_key, string_join=', ', **kwargs)
¶
Parameters:
-
input_key(str) –Key to the list of strings.
-
output_key(str) –Key to store the joined string.
-
string_join(str, default:', ') –String to join the list of strings. Defaults to ", ".
Source code in ragfit/processing/local_steps/formatting.py
UpdateField
¶
Bases: LocalStep
Class to update a field in the dataset with a new value.
Source code in ragfit/processing/local_steps/formatting.py
__init__(input_key: str, value, **kwargs)
¶
Parameters:
-
input_key(str) –example key to change.
-
value–New value to set for the field.