我正在尝试使用功能根据某些条件过滤Excel工作表 因此,无论何时输入职员名称,它都会根据姓名进行过滤
def small_Purchase_Filter(staff_name):
name_filter = pd.DataFrame((list["Procurement Staff assigned to PR"] == staff_name) & (master_list["Threshold"]== "Small Purchase") & (list["PR Status"]=="Completed") & (master_list["received"] != "open"))
return name_filter
注意:此代码
name_filter = pd.DataFrame((list["Procurement Staff assigned to PR"] == staff_name) & (master_list["Threshold"]== "Small Purchase") & (list["PR Status"]=="Completed") & (master_list["received"] != "open"))
直到我将它放到函数中之前,一切都还好,现在工作表的所有结果都是NaN
我希望我足够清楚,谢谢