答案 0 :(得分:0)
此代码可以为您提供帮助:
i=0
for j in range(Log_return.shape[1]):
#j chooses the column of Log dataframe
#shape[1] gives number of columns
for k in range(len(Log_return)):
# k chooses the rows one by one of jth column
shares.iloc[i,0]*Log_return.iloc[k,j]
#you can multiply and even store the values or do any operations you want
i+=1
#i determines the row of shares dataframe