0

Example CSV file

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.

3

1 Answer 1

2

Use dropna with the subset argument:

df.dropna(subset=['Age'], how='any')

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.