Skip to main content
Version: 0.95

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

NameTypeDefaultInfo
fieldstrThe field you want to truncate.
target_fieldstrThe output field to write the truncated strings to.
lengthintThe length to truncate to.
bystrWhether to truncate to <length> ‘words’ or ‘chars’.