请帮助我我有下面的图像我想在csv中我已经从图像中提取所有文本但无法放入csv这是我正在使用的代码但我无法放入带有像部分这样的列的csv,菜名、价格、描述和尺寸
img = cv2.resize(img, (int(img.shape[1] + (img.shape[1] * .1)),
int(img.shape[0] + (img.shape[0] * .25))),
interpolation=cv2.INTER_AREA)
img_rgb = cv2.cvtColor(img,cv2.COLOR_BGR2RGB)
custom_config = r'-l eng --oem 3 --psm 6 -c tessedit_char_whitelist="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-:.$%./@& *"'
d = pytesseract.image_to_data(img_rgb, config=custom_config, output_type=Output.DICT)
df = pd.DataFrame(d)
# clean up blanks
df1 = df[(df.conf != '-1') & (df.text != ' ') & (df.text != '')]
pd.set_option('display.max_rows', None)
pd.set_option('display.max_columns', None)
img = cv2.resize(img, (int(img.shape[1] + (img.shape[1] * .1)),
int(img.shape[0] + (img.shape[0] * .25))),
interpolation=cv2.INTER_AREA)
img_rgb = cv2.cvtColor(img,cv2.COLOR_BGR2RGB)
custom_config = r'-l eng --oem 3 --psm 6 -c tessedit_char_whitelist="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-:.$%./@& *"'
d = pytesseract.image_to_data(img_rgb, config=custom_config, output_type=Output.DICT)
df = pd.DataFrame(d)
# clean up blanks
df1 = df[(df.conf != '-1') & (df.text != ' ') & (df.text != '')]
pd.set_option('display.max_rows', None)
pd.set_option('display.max_columns', None)