ValueError: list.remove(x): x not in list(run fetch_data.py)
merrytomy opened this issue · comments
ValueError Traceback (most recent call last)
in
----> 1 get_all_history('000002', start='1995-01-01')
2
3 get_3_years_history('000002')
in get_all_history(stock_index, start, autype)
10 """
11 df = ts.get_h_data(stock_index, start = start, autype = autype)
---> 12 df = wash(df)
13 print('\nSaving DataFrame: \n', df.head(5))
14 df.to_csv('{}-from-{}.csv'.format(stock_index, start), index=False)
in wash(df, target)
11 df = df.reset_index(drop=True)
12 col_list = df.columns.tolist()
---> 13 col_list.remove(target)
14 col_list.append(target)
15 return df[col_list]
ValueError: list.remove(x): x not in list