0

i know we can use say df['col'] >= 1 to return a booleen mask of true/false values for a specific pandas df column, but is there a way to filter for data types?

I'd like to filter out NaN values in a column that has both string and NaN values.

1 Answers1

0

You can find the NaN's with df['col'].isna(). Returns a boolean mask.

jch
  • 3,600
  • 1
  • 15
  • 17