I have a data frame with the image paths in first column. As shown here: input dataframe
The filename of imagecontains IDs(ImageID) and type of image (Topo). I want to generate output data frame such as, it generates different columns of different Topos. So for one Image ID I get six columns of Topos. Output as shown here: Output dataframe
The number of Topos can be different, it can run from 4 to 27. So the numbers of output columns can be different.