📌  相关文章
📜  过滤数据框站点:stackoverflow.com - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:32.004000             🧑  作者: Mango

代码示例9
df_filtered = df.query('a > 0 and 0 < b < 2')

#If you need to refer to python variables in your query, the documentation says, "You can refer to variables in the environment by prefixing them with an ‘@’ character like @a + b". Note that the following are valid: df.query('a in list([1,2])'), s = set([1,2]); df.query('a in @s'). – 
#teichert