数据查询
1
2
3
4
#取df中date值为2017-01-01的行作为新的df并返回
isopen = df.loc[df.date=='2017-01-01']
#取出新df第一行第isopen列的数据
isopen_type = isopen.loc[isopen.index[0],'isopen']
1
2
3
4
#取df中date值为2017-01-01的行作为新的df并返回
isopen = df.loc[df.date=='2017-01-01']
#取出新df第一行第isopen列的数据
isopen_type = isopen.loc[isopen.index[0],'isopen']