# -*- coding: utf-8 -*-
#python读取csv文件内容,并保存到数据库中
import csv
import time
import pymysql
import emoji
num = 0
file_path = r'H:\20221103174026.csv' # r对路径进行转义,windows需要
##errors='ignore' 出现错误时忽略
with open(file_path, 'r' , errors='ignore') as csvfile:
reader = csv.reader(_.replace('\x00', '') for _ in csvfile)
#reader = csv.reader(csvfile)
for row in reader:
# the first row is table header
num = num+1
if num >= 18429:
pro_name = row[1]
google_img = emoji.demojize(row[2