示例
```
params = {"坐席姓名":"唐红成"}
query_string = ' and '.join(
[f'({key} == "{val}")' if type(val) == str else f'({key} == {val})' for key, val in params.items()]
)
df.query(query_string)
```
标签:val,python,dataframe,dict,key,params,query From: https://www.cnblogs.com/ministep/p/17401315.html