pandas处理excel表格时如何筛选年龄信息为20-65岁的年龄段
假设将excel中的数据导入到变量data中,年龄那一列的列名为age,那么筛选年龄为20-65岁的代码时:fdata=data.query('age>=20 & age<=65')