When I using pandas.to_sql
to write a df into mysql, the program gives me the following error:
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2019' in position 4: ordinal not in range(256)
my code is just as this:
tony.to_sql(con=con_larry, name = 'tony', if_exists='replace', flavor='mysql', chunksize=100)
I don't know why this error presents and how to solve it