Pandas Series: Class 12 PYQs 2024–2026 with solutions
All 17 CBSE board questions asked from Pandas Series in 3 board papers, with the year, set and marks of each. 10 are solved free below. The Class 12 Informatics Practices PYQ Book: Solved Board Papers 2024-2026 (CBSE) has every solution, all chapters and 3 full board papers.
Pandas Series: board weightage
Board weightage 2024–2026
| Year | 2024 | 2025 | 2026 |
|---|---|---|---|
| Questions | 4 | 7 | 6 |
| Marks | 6 | 11 | 10 |
Most asked topics
17 questions from 3 papers. Repeated questions are shown once with every year they were asked.
1 mark: MCQ and Assertion–Reason
True or False: In a Pandas Series, the positional index can be a string or an integer.
Solution
False. Positional indices are always integers 0, 1, 2…; only labels can be strings.
Creating a Series from a dictionary: (A) values become indices (B) keys become values (C) keys become the indices (D) default integer indices
Solution
(C) The keys of the dictionary become the index.
ser1[start:end] with positional indices: (A) end included (B) end excluded (C) both excluded (D) start excluded
Solution
(B) The element at the end position is excluded.
Default index type for a Pandas Series if not explicitly specified? (A) String (B) List (C) Numeric (D) Boolean
Solution
(C) Numeric: 0, 1, 2, …
Data structure for one-dimensional labelled data in Pandas? (A) Integer (B) Dictionary (C) Series (D) DataFrame
Solution
(C) Series.
Statement to select the element with index points from Series ser: (A) ser.element(points) (B) ser.select(points) (C) ser[points] (D) ser.show(points)
Which library defines an ndarray? (A) pandas (B) numpy (C) matplotlib (D) scipy
Output: dd={'One':1,'Two':2,'Three':3,'Seven':7}; rr=pd.Series(dd); rr['Four']=4; print(rr)
Which will NOT show the first five rows of Series S1? (i) S1[0:5] (ii) S1.head() (iii) S1.head(5) (iv) S1.head[0:5]
2 marks: very short answer
(a) Two characteristics of the Pandas library.
Solution
Any two: tabular data structures (Series, DataFrame); easy reading/writing of files such as CSV and Excel; powerful filtering, sorting, grouping and calculations; easy handling of missing data; fast on large datasets.
(a) Complete: Series from a NumPy array of 'a', 'b', 'c' with indexes 'first', 'second', 'third'. OR (b) Output of s1=pd.Series([1,2,3],index=['a','b','c']); s2=pd.Series([4,5,6],index=['b','c','d']); print(s1 + s2)
Solution
(a) import numpy as np; arr = np.array(['a','b','c']); s = pd.Series(arr, index=['first','second','third']).
(b) Labels are matched; 'a' and 'd' are in only one Series:
a NaN(As printed, the paper's code uses
b 6.0
c 8.0
d NaN
dtype: float64
S2 (capital); the board also accepted "NameError" as an answer.)(b) Explain how elements of a Series can be accessed using slicing, with an example.
Solution
For data = pd.Series([10,20,30,40,50], index=['a','b','c','d','e']): positional slicing data[0:3] or data.iloc[0:3] → a, b, c (end excluded); label slicing data['b':'d'] or data.loc['b':'d'] → b, c, d (end included); conditional data[data > 30] → d, e.
(a) Rewrite Rohit's code correctly: import pandas / data = [50, 15, 40] / series = pd.series(data, Index=['x','y','z']) / Print(series)
Correct the errors: import Pandas as pd / stud=['Name':'Ramya','Class':11,'House':'Red'] / s=p.Series(s) / print(s)
Output: com=pd.Series([45,12,15,200], index=['mouse','printer','webcam','keyboard']) / print(com[1:3])
3 marks: short answer
(a) Create and display a Series of days in July, Aug, Sept, Oct (31, 31, 30, 31) with month names as index.
Solution
import pandas as pd
s = pd.Series([31, 31, 30, 31], index=['July', 'Aug', 'Sept', 'Oct'])
# or pd.Series({'July':31, 'Aug':31, 'Sept':30, 'Oct':31})
print(s)
(b) Create a Series from an ndarray of 10, 20, 30, 40, 50 with indices 'A'–'E'.
Solution
import pandas as pd
import numpy as np
data = np.array([10, 20, 30, 40, 50]) # or np.arange(10, 60, 10)
s = pd.Series(data, index=['A', 'B', 'C', 'D', 'E'])
print(s)
Get every solution for all chapters
- Every board question of every chapter, each fully solved the way the board gives marks
- 3 complete board papers, each followed by its solutions
- Weightage and most-asked topics for every chapter
- Instant PDF download, colour and black & white print copies
Revising the chapter first? Complete Informatics Practices Notes for Class 12 (CBSE 065, 2026-27) →
What you get in the pack
- CBSE Class 12 Informatics Practices board papers 2024 to 2026 (3 full board papers)
- All 9 chapters and 3 board papers complete
- Part A: all 9 chapters, questions sorted chapter-wise and by marks
- Year-wise weightage table and most-asked topics for every chapter
- Part B: each full board paper followed by its complete solutions
- Pandas, Matplotlib and SQL answers verified by running the code
- Only the current syllabus in Part A
All chapters in this pack
- PYQ Ch 1 Pandas Series
- PYQ Ch 2 DataFrame: Creation and Attributes
- PYQ Ch 3 DataFrame Operations and CSV Files
- PYQ Ch 4 Data Visualisation with Matplotlib
- PYQ Ch 5 SQL Revision and Single-row Functions
- PYQ Ch 6 SQL Aggregates, Grouping and Joins
- PYQ Ch 7 Computer Networks
- PYQ Ch 8 Introduction to the Internet and Web
- PYQ Ch 9 Societal Impacts
- Board Paper 2026 Set 90 with Solutions
- Board Paper 2025 Set 90 with Solutions
- Board Paper 2024 Set 90 with Solutions
