operators.truncate.TruncatePreprocessor
- class operators.truncate.TruncatePreprocessor(field, target_field=None, length=5000, by='words')
Truncates a column by given amount.
Truncates the given column (with string values) and writes result to the target field.
Parameters
Parameters
Name Type Default Info field str
The field you want to truncate. target_field str
The output field to write the truncated strings to. length int
The length to truncate to. by str
Whether to truncate to <length> ‘words’ or ‘chars’.