tianjiaozilong
2021-02-07 19:15
采纳率: 100%
浏览 44
已采纳

各位大神好,请帮我看看以下这个问题可以吗?解决不了

if __name__== '__main__':
    print(1)
    #stockData = []
    stockData = {}
    datas1 =xlrd.open_workbook(r'C:\Users\86138\Desktop\zi_ding_yi.xlsx',{'constant_memory':True})

    #datas1 = xlrd.open_workbook(r'C:\Users\86138\Desktop\zi_ding_yi.xlsx')
    print(2)
    table = datas1.sheets()[1]
    row_num = 0
    print(3)
    # for item in table[1:]:
    #      stockData.append(float(table.col_values(6)))
    col = table.col_values(5)
    while row_num <= 800 :
     stockData{row_num} = table.col_values(5,0,row_num)
     row_num =+1

    agent = Agent(state_size=STATE_SIZE, action_size=3)
    print(4)
    l = len(stockData) - 1

    # scores = dqn()
    scores1 =dqn1()

File "C:/Users/86138/Desktop/stockPrediction-master/yunfuzai_main.py", line 111
    stockData{row_num} = table.col_values(5,0,row_num)
             ^
SyntaxError: invalid syntax
 

这是错误,说我少个还是怎么回事?

 

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

5条回答 默认 最新

相关推荐 更多相似问题