想查询价格那一列下1500~2000的数据

也就是说1500<价格<=2000

如下报错写法:data.loc[(800<data['售价']<=1000)]

正确修改:

data.loc[(800<data['售价']) & (data['售价']<=1000)] ,就可以了

更多推荐