我有一个脚本可以根据值列表过滤数据框。
SimpleDoubleProperty
作为这个问题的方向:https://stackoverflow.com/a/12098586/10078930
这在 python 3.7.9 之前没有问题。最近我更新到了 python 3.9,现在当我运行我的脚本时,当我尝试“过滤”项目列表时它会给出这个输出:
with open('itens.txt', 'r') as f:
items = f.read().strip().split()
df = df[df['Item'].isin(items)]
有没有办法解决这个问题,或者有更好的方法来过滤基于文本文件的列表?