I am storing pandas df into mysql using sqlalchemy as below,
db_connection = sql_engine.connect()
frame = pd_df.to_sql(table_name, db_connection, if_exists='append', index=False)
where primary keys is defined and column exists in df itself. I want to update all the columns of the row if there are multiple records with same primary key exists in df.
I don't want to ignore the rows but update all the column values for that id.
How to achieve this ?