I would like to create an isna() clause using the .query() method in Pandas
I am getting an error though.
For a reproducible example:
import pandas as pd
import seaborn as sns
mpg = sns.load_dataset('mpg')
mpg[mpg['cylinders'].isna()] # This works
mpg.query('cylinders.isna()') # This raises an exception
TypeError: 'Series' objects are mutable, thus they cannot be hashed