I have a pandas dataframe where one of the columns contains a list format tield (i.e. [2ndchance])
I want to insert it in a database as it is, but I am obtaining an error.
I ame executing the following sentence:
df_playbyplay.to_sql('playbyplay', con=engine, if_exists='replace', index=False)
and it fails wit the following error:
ProgrammingError: (mysql.connector.errors.ProgrammingError) Failed processing pyformat-parameters; Python 'list' cannot be converted to a MySQL type [SQL: 'INSERT INTO playbyplay
I would like to add it to the table as it is, if it is not possible just want to remove it from my dataframe, but whatever I execute it seems that always recognize it as a list while originally is just a string.