I am using dask
to read a large csv file. I wanted to drop a few rows based on one column value. If for that particular column the row value is empty I want to remove the entire row.
I tried using .dropna
:
df = df.dropna(subset=['tier1_name'],how = 'any',axis =0)
However, I got this error:
TypeError: dropna() got an unexpected keyword argument 'axis'
So I used .drop
instead:
df.drop(df['tier1_name'].isnull(), axis = 0)
But then got this error:
"Drop currently only works for axis=1 or when columns is not None"
NotImplementedError: Drop currently only works for axis=1 or when columns is not None
I don't understand what should I use to execute the desired operation. Help!