← Quiz: Data Cleaning: all 10 questions
Quiz: Data Cleaning · Question 7 of 10
What does this print? (code)
What does this print?
import pandas as pd
cgpa = pd.to_numeric(pd.Series(["8.9", "six", "7.2", ""]), errors="coerce")
print(cgpa.isna().sum())
- A.0
- B.1
- C.2
- D.4
Answer & explanation
Correct answer: 2
"six" and the empty string cannot be converted, so both become NaN.
Can you get the rest right without peeking?
Take the timed Quiz: Data Cleaning quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →