Standard difficulty · 20 questions · 40 marks · Time: 39 minutes
Show your working for Sections B and C. Answers are on the last page — try every question first!
Data Handling using Pandas – II · AW-12IP-PD2-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.
| Q | Answer | Working |
|---|---|---|
| 1 | (d) median() | — |
| 2 | (c) 56.0 | sorted: 38, 44, 56, 57, 62; the middle value |
| 3 | (d) 75.2 | 376 ÷ 5; mean() always gives a float |
| 4 | (d) Kabir | ascending order of Q2: Isha, Sana, Kabir, Tara, Arjun, Manav |
| 5 | (c) 42 | the rows with City Shimla |
| 6 | (a) 5 | count() leaves out missing values |
| 7 | (c) 2 | isnull() is True for each missing value; sum() counts the Trues |
| 8 | (d) (4, 4) | dropna() drops every row that has a missing value |
| 9 | Summarising data by numbers that describe it, such as max(), min(), mean(), median(), mode(), count(), sum(), std(), var() and quantile(). | — |
| 10 | 56 | 76 − 20 |
| 11 | Pooja, Karan | sorted by Science, lowest first; the first 2 rows |
| 12 | 2 | count() over the rows with Store South |
| 13 | 225.0 | missing values become 0; the column holds floats, so the sum is a float |
| 14 | 3 | missing values are skipped |
| 15 | Central | 104 North | 94 West | 39 | one value per group; groupby sorts the group labels |
| 16 | 52.75 | missing values are skipped: 211 ÷ 4 |
| 17 | df['Marks'].max() gives the highest mark; min() the lowest; mean() the average (sum ÷ count); median() the middle value of the sorted marks; mode() the most frequent; std() the spread around the mean; count() the number of values present. | one mark for each function |
| 18 | (a) 5; (b) 225.0; (c) (5, 4) | (a) and (b) skip missing values, and the column is a float column; (c) drops the rows with a missing value |
| 19 | (a) Accounts | 125 Sales | 106 Support | 131 (b) Accounts | 83 Sales | 61 Support | 71 | one line per group, the group labels in sorted order |
| 20 | (a) 83; (b) 27; (c) 47.0; (d) 41.0 | sorted: 27, 30, 41, 54, 83; total 235 over 5 values |