Hi,
i am looking at a method that adds a new line to add the label for corresponding group of records.
Heres what i am looking at:-
This is what my input file looks like:-
| A | B | C | D | Group_Label |
| 1 | 2 | 3 | 4 | ABC |
| 1 | 2 | 3 | 4 | ABC |
| 1 | 2 | 3 | 4 | DEF |
| 1 | 2 | 3 | 4 | DEF |
| 1 | 2 | 3 | 4 | DEF |
| 1 | 2 | 3 | 4 | GHI |
| 1 | 2 | 3 | 4 | GHI |
| 1 | 2 | 3 | 4 | GHI |
| 1 | 2 | 3 | 4 | GHI |
| 1 | 2 | 3 | 4 | JKL |
| 1 | 2 | 3 | 4 | JKL |
| 1 | 2 | 3 | 4 | MNO |
| 1 | 2 | 3 | 4 | PQR |
| 1 | 2 | 3 | 4 | PQR |
Heres what i desire the output file to look like:-
| A | B | C | D | Group_Label |
| ABC | | | | |
| 1 | 2 | 3 | 4 | ABC |
| 1 | 2 | 3 | 4 | ABC |
| DEF | | | | |
| 1 | 2 | 3 | 4 | DEF |
| 1 | 2 | 3 | 4 | DEF |
| 1 | 2 | 3 | 4 | DEF |
| GHI | | | | |
| 1 | 2 | 3 | 4 | GHI |
| 1 | 2 | 3 | 4 | GHI |
| 1 | 2 | 3 | 4 | GHI |
| 1 | 2 | 3 | 4 | GHI |
| JKL | | | | |
| 1 | 2 | 3 | 4 | JKL |
| 1 | 2 | 3 | 4 | JKL |
| MNO | | | | |
| 1 | 2 | 3 | 4 | MNO |
| PQR | | | | |
| 1 | 2 | 3 | 4 | PQR |
| 1 | 2 | 3 | 4 | PQR |
So basically keeping rest of table intact, only new rows with label of the Group of transactions below, to be introduced.
Any pointers towards this will be most helpful.
Regards,