🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: pandas Basics: all 10 questions

Quiz: pandas Basics · Question 6 of 10

What does this print? (code)

What does this print?

import pandas as pd
df = pd.DataFrame({"name": ["Asha", "Ravi", "Neha"], "cgpa": [8.9, 7.2, 8.1]})
print(df.shape, df["cgpa"].max())
  1. A.(2, 3) 8.9
  2. B.(3, 2) 7.2
  3. C.(3, 2) 8.9
  4. D.3 8.9
Answer & explanation

Correct answer: (3, 2) 8.9

3 rows and 2 columns; the highest CGPA is 8.9.

Can you get the rest right without peeking?

Take the timed Quiz: pandas Basics quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →