I have a Pandas dataframe, where some columns have values longer than 65536 characters. When I tried to export the data to MySQL using df.to_sql(con=engine, name=table_name, if_exists='replace', index=False), they were truncated to 65536 characters.
Is there a way to automatically convert a column to LONGTEXT or BLOB (instead of TEXT) if it has values longer than 65536 so that the table content won't be truncated?