pandas query use variable for variable name code example Example: using variables in df.query csub = inv.query('County == @county')