← 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())
- A.(2, 3) 8.9
- B.(3, 2) 7.2
- C.(3, 2) 8.9
- 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 →