Informatics Practices

What additional argument do you need to specify in to_sql() so that old data of MySQL table is retained ?

Python Pandas

3 Likes

Answer

The if_exists argument in the pandas to_sql() function retains old data in a MySQL table. Using if_exists = append appends new data without deleting existing data.

Answered By

2 Likes


Related Questions