我有 Pandas 系列,我们将其称为approved_fields,我想用它来过滤df:
approved_field(['Field1','Field2','Field3')]
df
Field
0 Field1
1 Field4
2 Field2
3 Field5
4 Field2
应用approved_field 过滤器后,生成的df 应如下所示:
Field
0 Field1
1 Field2
2 Field2
谢谢!