Sequence: Generate an integer sequence field¶
- class txf.Sequence(source, output[[, start=0, step=1]])¶
The
Sequence
transform generate a sequence of integers. Its arguments are:- source: Transform or None¶
The input pipeline. If one is not provided,
Sequence
will generate rows indefinitely.
- output: str¶
The name of the output field. It cannot overwrite existing fields. Use
Drop
to remove unwanted fields.
- start: int¶
The start value for the sequence. Note that it defaults to zero, not one.
- step: int¶
The increment amount for each record.
Usage¶
Sequence(p, 'Row #', 1)
Sequence(p, 'Even', 0, 2)