transformations:enumerate
This is an old revision of the document!
Enumerate rows
This transformation adds a new column with row numbers. Rows can be enumerated either for the entire table, or inside groups defined by combinations of values in particular columns. In the latter case, row numbers restart from 1 inside each group.
Example
Before transformation
Province | Amount | Total Tax |
---|---|---|
ON | 1000 | 125 |
ON | 1500 | 187.5 |
QC | 2000 | 270 |
After transformation (enumeration for entire table).
RowNo | Province | Amount | Total Tax |
---|---|---|---|
1 | ON | 1000 | 125 |
2 | ON | 1500 | 187.5 |
3 | QC | 2000 | 270 |
After transformation (enumeration for each Province).
RowNo | Province | Amount | Total Tax |
---|---|---|---|
1 | ON | 1000 | 125 |
2 | ON | 1500 | 187.5 |
1 | QC | 2000 | 270 |
transformations/enumerate.1574166951.txt.gz · Last modified: 2019/11/19 07:35 by dmitry