Lift: Fill in missing values by copying up¶
- class txf.Lift(source, input[, default=''[, blank='']])¶
The
Lift
(orFillUp
) transform fills in missing values by using the next non-blank value for the field.Lift
is a logical form ofFormat
because it reformats a field, but it is not a subclass. It is so named because “lift” is roughly “fill” spelled backwards, which suggests the operation.- input: str¶
The name of the field to fill in. The contents will be replaced, so use
Copy
to preserve the original.
- default: any¶
The value to use when there is no most recent value (e.g, at the top of the file). It needs to match the type of the field.
- blank: any¶
The value to use to determine “blankness” (e.g., for non-string fields it might be
0
orNone
).
Usage¶
Lift(p, 'State')
Lift(p, 'Total', 0.0, 0.0)