有这样一数据集:

panads 数据筛选 过滤

 筛选age 在18到30,score在85到100

import pandas as pd

students = pd.read_excel("C:/Users/Administrator/Desktop/Students.xlsx",index_col="ID")
students = students.loc[students.Age.apply(lambda a:18 <= a < 30)].loc[students.Score.apply(lambda s:85 <= s <= 100)]

 

相关文章:

  • 2021-11-09
  • 2022-12-23
  • 2021-07-25
  • 2021-10-12
  • 2022-12-23
  • 2021-06-29
  • 2022-02-23
  • 2021-06-07
猜你喜欢
  • 2021-09-21
  • 2021-10-25
  • 2022-01-25
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案