🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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())
  1. A.0
  2. B.1
  3. C.2
  4. 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 →