2017-07-31 84 views
0

我无法在Excel中写入数据。Python熊猫如何在Excel中写入数据数据

你需要什么参数来指定DataFrame()中的功能?

import pandas as pd 

table = pd.read_excel("file1.xlsx", sheetname="file1") 
lastval = table['lastval'].values.tolist() 
newval = table['newval'].values.tolist() 
rm = table['rm'].values.tolist() 
itog = [0, 0, 0] 

for i in range(3): 
    itog[i] = (newval[i]-lastval[i]) * rm[i] 
    pd.DataFrame(?????) 

回答