Pandas to_sql TypeError: sequence item 0: expected str instance, dict found

 

 

 Print data format a bit, did not find the problem. If that is the cause of dictionary examples.

I guess also caused extra fields because extra field is a json field. To turn str strong for such a format based on tips online.

 

 Other findings: pd.to_sql operations also to our table were deleted and reconstruction (if_exists = "replace"), we want to change the format of the data.

It may be pd.df not support the json caused. Other property sheet has not been retained.

Guess you like

Origin www.cnblogs.com/wqbin/p/11897784.html