I have a CSV file with 3 columns Imagename , image_size and class. I want to create multiple text files reading the CSV with Imagename as filename and image_size and class as file content.
I need to loop through the Imagename and if the Imagename is similar the append the corresponding image_size and class in a single txt file.
If the Imagename is different, create another txt file and append it's corresponding image_size, class.
Below is the sample csv:
Image_name image_size class
Img_0001 150 brightness
Img_0001 153 Noise
Img_0001 170 skewness
Img_0002 132 brightness
Img_0002 188 Noise
Img_0002 191 skewness
Img_0003 159 brightness
Img_0003 111 Noise
Img_0003 170 skewness
The filename I need to create:
Img_0001.txt
and the file content within the txt file :
150 brightness
153 Noise
170 skewnes