I have an Excel sheet with 100 rows. Each one has various informations, including an id, and a cell containing a photo.
I use pandas to load the data into dictionaries :
import pandas as pd
df = pd.read_excel('myfile.xlsx')
data = []
for index,row in df.iterrows():
data.append({
'id':row['id'],
'field2':row['field2'],
'field3':row['field3']
})
For the image column, I want to extract each image, name it with the id of the row (image_row['id'].jpg) and put it into a folder. Then, I want to store the path to the image as below :
for index,row in df.iterrows():
data.append({
'id':row['id'],
'field2':row['field2'],
'field3':row['field3'],
'image':'path/image_'+row['id']+'.jpg'
})
I'm looking for a way to do that, or another way if better. Do you have any idea ?
I'm on Linux, so I can't use this method with pywin32.
Thanks a lot
-- EDIT
You can find here an exemple of sheet i use