Covert UiPath flow to Python code/Split Excel into rows


I had the tasks of splitting my excel file in different file based of pairs of same “ID”. I think it is a bit like candy crush. We want to find matching rows based on column “ID” and then paste it in a single row as shown below:

Then it become like this:

Thankfully, @Hiba_B solved it in UiPath at this link: Splitting Excel in various columns - #16 by Hiba_B

But now I wanted to know if we could write a python code to do exactly what the Robot is doing?
Is that possible?
Can you give me some guide on where to start?
UIPath_Excel_Scratch.xlsx (121.1 KB)
From_separate_lines_to_shortned_ones.xaml (24.8 KB)

1 Like