I have a List like shown below (The list has been obtained by converting a pandas dataframe to a list. The pandas dataframe is obtained from an excel):
- L = [[3982, 36308220021, Timestamp('2017-07-01 14:10:37'), '', Timestamp('2017-07-01 14:20:48'), '', 0, 0]]
Note: L is actually a nested list with more than 5000 entries.
I am inserting the values in MySQL using python . There I have defined the column as "dateACW DATETIME" during CREATE TABLE operations. Similar column names have been defined for other Timestamp values from the list. During insertion in MySQL, it gives following error: "AttributeError: 'Timestamp' object has no attribute 'translate'". I tried using TIMESTAMP datatype instead of DATETIME. That did not help. Please help me out with explanation on whats the problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…