You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can specify the sql type using the dtype argument in to_sql. Now, this argument has to be a dict (mapping of column name -> type).
Letting to_sql recognize a single value as the sql type for all columns is not that difficult to add.
So instead of this:
df.to_sql(...., dtype={col_name: sqlalchemy.types.NVARCHAR for col_name in df})