I have a DataFrame
named df
with a column col
containing values True
, False
and "N/A"
(types are bool
, bool
and str
respectively). I want to select only the rows containing True
.
df[df.col==True]
works, but generates the warning PEP 8: comparison to True should be 'if cond is True:' or 'if cond:'
.
Is there a PEP8 compliant way to do this?