Parsing CSV file with moving one cell to a different row

Viewed 19

I am looking for advice on how to parse a file. It is similar to this I have written. Basically the second column has an identifier that I would like to move to another column in the rows below it.

It can change and the numbers of rows below the string could change as well. I need to iterate over multiple files which may have different number of rows.

My main issue is I do not know how to move the column 2 item to the same row, iterating over the below rows until it changes(I could base off the first column it will have an empty cell).

I created a sample excel since I can't share the actual data. The left side would be the original data, the right side is how I want to format. Example

0 Answers
Related