print(df['2014-04-01':'2014-12-31'][df.close>47])
出现下列警告
UserWarning: Boolean Series key will be reindexed to match DataFrame index.
意思为:布尔型系列键将索引匹配获得对应的索引
改为
df2014=df['2014-04-01':'2014-12-31'] print(df2014[df2014.close>47])
print(df['2014-04-01':'2014-12-31'][df.close>47])
出现下列警告
UserWarning: Boolean Series key will be reindexed to match DataFrame index.
意思为:布尔型系列键将索引匹配获得对应的索引
改为
df2014=df['2014-04-01':'2014-12-31'] print(df2014[df2014.close>47])