Question: I'm trying to do something like 

```
df.query("'column' == 'a'").count()

```

but with

```
df.query("'column' == False").count()

```

What is the right way of using `query` with a bool column?

Answer: 
It's simply `'column == False'`.

```
>>> df = pd.DataFrame([[False, 1], [True, 2], [False, 3]], columns=['column', 'another_column'])                       
>>> df                                                                                                                 
   column  another_column
0   False               1
1    True               2
2   False               3
>>> df.query('column == False')                                                                                        
   column  another_column
0   False               1
2   False               3
>>> df.query('column == False').count()                                                                                
column            2
another_column    2
dtype: int64

```

Personally, I prefer boolean indexing (if applicable to your situation).

```
>>> df[~df['column']]                                                                                                  
   column  another_column
0   False               1
2   False               3
>>> df[~df['column']].count()                                                                                          
column            2
another_column    2
dtype: int64

```
Even simpler using query:

```
df.query("~column").count()

```

**Actually, below are the non-query ways to do it, they are actually not as pretty and can be slower (as query is sometimes very optimized)**

Though you really should be using:

```
df[~df["column"]].count()

```

or if you prefer (more readable, but not always possible):

```
df[~df.column].count()

```