Standard difficulty · 20 questions · 40 marks · Time: 40 minutes
Show your working for Sections B and C. Answers are on the last page — try every question first!
Data Handling using Pandas – I · AW-12IP-PD1-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.
| Q | Answer | Working |
|---|---|---|
| 1 | (d) a one-dimensional labelled array | — |
| 2 | (c) A, B | iloc slices by position: 0 up to, not including, 2 |
| 3 | (a) 60, 75 | keeps the elements where s > 58 |
| 4 | (d) (4, 4) | drop with a row label (axis=0) removes a row |
| 5 | (a) 53 | row E6, column Q2 |
| 6 | (c) 24 | iloc counts rows and columns from 0: row P5, column Price |
| 7 | (b) e, f | tail(2) shows the last 2 elements |
| 8 | (b) 36 | a scalar is repeated for each of the 4 labels |
| 9 | A Series is one-dimensional and has one index; a DataFrame is two-dimensional with a row index and column labels. A Series holds values of one column; a DataFrame can hold several columns of different types. | — |
| 10 | 300 | Jan to May, both included: 74 + 62 + 59 + 29 + 76 |
| 11 | 4 | the rows where Science >= 64 |
| 12 | 5 | count() of column Science |
| 13 | (5, 4) | rows: 6 − 1; columns: 4 + 1 − 1 |
| 14 | Mon | 93 Tue | 58 Wed | 55 Thu | 106 Fri | 92 | the operation is applied to every element; the labels stay |
| 15 | Imran, Kabir | rows S2 to S3, both included |
| 16 | Name | Kabir City | Pune Maths | 82 Science | 80 | iloc[0] is the row at position 0: S1 |
| 17 | (a) pd.DataFrame({'Name': ['Asha', 'Ravi'], 'Marks': [78, 85]}): keys become columns. (b) pd.DataFrame([{'Name': 'Asha', 'Marks': 78}, {'Name': 'Ravi', 'Marks': 85}]): each dictionary is a row. (c) pd.read_csv('marks.csv'): the file’s first line gives the column names. | one mark each; one for correct explanation |
| 18 | index | Name | Q1 E2 | Vikram | 86 E3 | Karan | 65 E4 | Sana | 58 E6 | Pooja | 74 | rows where Q1 >= 58, only the columns Name and Q1 |
| 19 | (a) (5, 5); (b) 130; (c) 75 | Total = Maths + Science for each row; one column is added |
| 20 | (a) b | 96 c | 75 d | 29 e | 61 f | 56 (b) b | 96 c | 75 d | 29 e | 61 loc includes the end label f; iloc stops before position 5. | loc slices by label (end included); iloc by position (end left out) |