Reputation: 27
In the following csv I want to remove all rows that are empty with respect to column 'Age' only (i.e. row 4 & 5 to be removed of entire file)
I tried
df['Age'].dropna(how ='any')
But this isn't the solution.
Upvotes: 0
Views: 393
Reputation: 4633
Use dropna
with the subset
argument:
df.dropna(subset=['Age'], how='any')
Upvotes: 2