我有两个变量:
date = 2018-10-25
所有日期都存储在
df =[['Euro', 0.8762059999999999], ['British Pound', 0.7755920000000001], ['Indian Rupee', 73.246211], ['Australian Dollar', 1.4093959999999999], ['Canadian Dollar', 1.308288], ['Singapore Dollar', 1.379124], ['Swiss Franc', 0.999036], ['Malaysian Ringgit', 4.1631849999999995], ['Japanese Yen', 112.293159], ['Chinese Yuan Renminbi', 6.944638]]
就像那张单子一样。你知道吗
我想要输出:[['Euro',2018-10-25, 0.8762059999999999],['British Pound', 2018-10-25, 0.7755920000000001],['Indian Rupee',2018-10-25, 73.246211],....]
对于使用pandas/python的for循环的列表的所有元素都是这样的。你知道吗
想把它存储在Mysql数据库中,那么,它的查询是如何产生的呢?你知道吗
所以请帮助指导我该怎么做。 我试过这个但没用:
total = []
for i in df:
total = [df[0][0], date, df[0][1]]
试试这个:
现在,您可以从上面创建一个
dataframe
插入到Mysql
让我知道它是否有效。你知道吗
超级简单:
相关问题 更多 >
编程相关推荐