I have a dataframe that looks something like this:
date-time val 1 val 2 val 3
sample date-time 1 92 81 100
sample date-time 2 84 78 96
sample date-time 3 79 100
sample date-time 4 84 83
sample date-time 5 80 100
sample date-time 6 84 83 95
(note the missing values in multiple columns)
I’m trying to remove all rows that have atleast 1 missing value in columns val 1 or val 3 using dropna but it doesn’t do anything.
Here’s what I tried:
dftest = df.dropna(subset=['val 1', 'val 3'], how='all')
dftest
but this makes no changes in the dataframe. I suspect the values might not be being considered as empty or nans but I’ve no idea as to how or why that could happen. Any ideas would be appreciated, thanks!