The to_sql() function cannot create a MySQL table.
1 Like
False
Reason — The to_sql() function in pandas, when used with the if_exists = 'replace' parameter, can create a MySQL table.
to_sql()
if_exists = 'replace'
Answered By
3 Likes
In order to read from a MySQL table into a DataFrame, the table must exist.
The to_sql() function can append to a MySQL table.
The to_sql() function cannot work if the named table already exists.
The read_sql() can also read from CSV files.