对dataframe单元格赋值

大家好!

img

我将上图中的excel表格导入python生成一个Dataframe
现在我要使用Tushare的行情查询A列中每个股票在日期start_date的收盘价,并填入start_date_price列的相应行中.

我的代码如下:

df = pd.read_csv('D:/private/stock investment/st_research.csv')

for x,y in df['ts_code'],df['start_date']:
result=ts.pro_bar(ts_code=x, adj='qfq',start_date=y)
#将查询到的收盘价填入start_date_price列的相应行中
df.loc[df[df.ts_code == x].index.tolist(),‘start_date_price’] = result.loc[0,'close']

print(df.head())

报错信息如下图:

img

请问是什么原因,如何解决?谢谢!

你这单引号是中文标点呀
英文标点两个引号长的一样,是不分正反的
明明你这下一行代码里引号就是对的,上面的代码你是怎么打上去的