I am using pandas (0.20.3)
and python 3.5.3
I have error like this
mysql.connector.errors.ProgrammingError: 1054 (42S22): Unknown column 'nan' in 'field list'
I thought it is because of mysql doesn't understand 'nan' as mull.
According to this article
The problem was fixed in pandas 0.15.0
However I still have this error. is there something wrong with my cord??
Or where should I fix??
stocksDf = pd.read_csv('companys.csv', names=['name','place'])
for i,row in stocksDf.iterrows():
sql = "insert into CompanyUs(name,place) VALUES(%s,%s)"
data = (row['name'],row['place'])
cur.execute(sql,data)
pprint("Company Write : %s" % row['name'])
conn.commit()