from nsepy import get_history
from datetime import date
import datetime
import pandas as pd
import numpy as np
file = r'C:\Users\Raspberry-Pi\Desktop\Desktop\List.xlsx'
list = pd.read_excel(file)
list = list['SYMBOL']
start = date.today()-datetime.timedelta(days = 10)
end = date.today()
symb = get_history(symbol='INFY',start = start,end = end)
h = symb.tail(3).High.tolist()
l = symb.tail(3).Low.tolist()
print(type(h))
print(type(l))
x = map(lambda a,b:a-b,h,l)
print(type(x))
x = list(x)
我收到错误:
系列对象不可调用
及其指向x = list(x)
线。