dataframe 存入MySQL,Python 'timestamp' cannot be converted to a MySQL type

問題:時間戳類型數據,落地數據庫出現問題

mysql.connector.errors.ProgrammingError: Failed processing format-parameters; Python 'timestamp' cannot be converted to a MySQL type

解決:

把dataframe 類型爲時間戳那一列  轉爲str

dayMoney['dateTime'] = dayMoney['dateTime'].astype('str')

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章