Format: Replace a value with a computed value¶
- class txf.Format(source, outputs, function)¶
The
Formattransform reformats the values of a field using a user-supplied function.- input: Transform¶
The name of the string field to apply the function to. The contents will be replaced, so use
Copyto preserve the original.
- function: callable¶
A Python
callablethat receives the original value and returns the reformatted value.
Usage¶
Format(p, 'Year', lambda x: x+1)