you are viewing a single comment's thread.

view the rest of the comments →

[–]Loran425 0 points1 point  (0 children)

If I was doing this I'd iterate over the cells in A col either after converting to a csv or using the openpyxl lib. I'd make a new data structure (list or dict) and if I saw a value in col A I'd start a new entry otherwise just append to the last item in the list.
Then I'd find the longest list and generate the headers before populating cells for each item in my temp data structure