Around 8 to 10 marks of the Class 12 Informatics Practices theory paper come from Data Handling using Pandas Series. The NCERT Solutions on this page answer every Series question in the back exercise, according to the latest 2026-27 CBSE syllabus. Each answer uses the same series names that NCERT uses, so the code you write matches the book line for line.

- Exercise questions 1, 4, 5, 6, 7 and 8 are pure Series work; the rest belong to the DataFrame chapter.
- Unit 1 Data Handling using Pandas and Data Visualisation carries 25 of the 70 theory marks.
- Every command here runs in Python, so you can type it and check the output yourself.
Every solution on this page is written by Collegedunia subject experts on the 2026-27 NCERT print, tested in Python with pandas, and checked against the CBSE Class 12 Informatics Practices marking scheme.
Data Handling using Pandas Series Exercise Questions and What Each One Tests
The back exercise mixes short theory with command writing. Questions 1, 3 and 4 are one-line theory. Questions 5 to 8 hand you five named series and ask you to build them, then operate on them. Use the map below to decide what to revise first.
| Exercise Question | What it asks | Skill tested |
|---|---|---|
| Question 1 | Define a Series and separate it from a 1-D array, a list and a dictionary | Definition plus a three-way comparison |
| Question 3 | Explain how a DataFrame is related to a Series | Link between the two data structures |
| Question 4 (i) | State what the size of a Series means | Attribute recall |
| Question 5 (a to e) | Build EngAlph, Vowels, Friends, MTseries and MonthDays | All four ways of creating a series |
| Question 6 (a to f) | Set values, divide by a number, add two series, subtract, multiply, divide, rename labels | Mathematical operations and index alignment |
| Question 7 (a to h) | Find dimensions, size and values; rename a series; name the index; slice by label and by position | Attributes, methods and slicing rules |
| Question 8 (a and b) | Print months 3 through 7 and print the series in reverse order | Label slicing and negative-step slicing |
Tip: Question 5 builds the five series that Questions 6, 7 and 8 depend on. Write those five statements once on a fresh page and keep them in front of you while solving the rest.
Python Libraries for Data Handling: NumPy, Pandas and Matplotlib Compared
A Python library is a set of ready-made modules you can import instead of writing long programs yourself. NCERT names three of them at the start of the chapter. The install command is short and CBSE has asked for it directly: pip install pandas.
| Library | Full form or origin | What it is used for |
|---|---|---|
| NumPy | Numerical Python | Numeric work on a multidimensional array object; elements stay together in memory, so access is fast |
| Pandas | PANel DAta | Importing, cleaning and analysing data; built on NumPy and Matplotlib |
| Matplotlib | Plotting library | Line charts, bar charts, histograms and scatter plots in a few lines of code |
Pandas has three data structures named in the book: Series, DataFrame and Panel. Only the first two are studied in Class 12. The four differences NCERT lists between Pandas and NumPy are worth learning as points, because they answer a two-mark question on their own.
- A NumPy array needs one data type throughout; a Pandas DataFrame can hold float, int, string and datetime together.
- Pandas has a simpler interface for file loading, plotting, selection, joining and GROUP BY.
- Column names in a DataFrame make it easy to keep track of what each column holds.
- Pandas suits tabular data; NumPy suits numeric array work.
Pandas Series Chapter 2 Explained in Video
Source: Magnet Brains on YouTube
What a Pandas Series Is and How It Differs from a List, 1-D Array and Dictionary
This is Question 1 of the exercise and the most common two-part question from the chapter. Start with the definition, then give the three differences as separate points.
Definition. A Series is a one-dimensional array that holds a sequence of values of any data type. Every value carries a data label with it, and that label is called its index. By default the index runs from 0 to N minus 1. Think of a Series as one column of a spreadsheet.
| Compared with | How a Series is different |
|---|---|
| 1-D NumPy array | A Series lets you set your own labels as the index; an array can only be reached by integer position. A Series lines up two sets of data by label and fills gaps with NaN, which an array cannot do. |
| List | A list has no labelled index and no dtype of its own. Adding two lists joins them end to end, while adding two series adds the matching values. |
| Dictionary | A dictionary stores key and value pairs but has no slicing and no element-wise maths. A Series can be built from a dictionary, and then the keys become the index labels. |
Two more short answers sit right next to this one. Question 3 asks how DataFrames relate to Series: a DataFrame is two-dimensional, and each of its columns is a Series, with every column sharing the same row index. Question 4 asks about size: the size of a Series is the count of values in it, while the size of a DataFrame is the number of rows multiplied by the number of columns.
Four Ways to Create a Pandas Series for the Class 12 Board Paper

NCERT shows four sources for a Series, and Question 5 asks you to use all of them in one go. Import the library first with import pandas as pd. The alias pd is a convention, not a rule, but the marking scheme expects it.
| Source | Statement | What the index becomes |
|---|---|---|
| Scalar values in a list | series1 = pd.Series([10,20,30]) | Default numbers 0, 1, 2 |
| List with your own labels | pd.Series([2,3,4], index=["Feb","Mar","Apr"]) | Feb, Mar and Apr |
| NumPy array | pd.Series(np.array([1,2,3,4])) | Default numbers 0 to 3 |
| Dictionary | pd.Series({'India':'NewDelhi','UK':'London'}) | The dictionary keys |
| Nothing at all | MTseries = pd.Series() | Empty series; MTseries.empty gives True |
One error carries a mark of its own. If the index list and the value list are of different lengths, Python raises a ValueError. Passing four values with three labels prints the message Length of passed values is 4, index implies 3. Write that message in full if the question asks what happens.
Indexing and Slicing a Series: Positional Index Against Labelled Index
There are two ways to reach the values inside a Series: indexing and slicing. Both accept either a position or a label, and the two behave differently at the end of a slice. Questions 7 and 8 are built entirely on this difference.
- A positional index is an integer that counts from 0, so
seriesNum[2]gives the third value. - A labelled index is any label you set yourself, so
seriesCapCntry['India']gives NewDelhi. - Pass a list to pull out several values at once:
seriesCapCntry[['UK','USA']]prints both rows. - Replace all labels at once by assigning a new list to
.index, for exampleseriesCapCntry.index=[10,20,30,40].
The slicing rule is the single most tested line in this chapter. A positional slice leaves out the value at the end position, but a labelled slice includes the value at the end label. So seriesCapCntry[1:3] returns two rows, while seriesCapCntry['USA':'France'] returns three.
| Statement | What it does | End value included? |
|---|---|---|
seriesAlph[1:3] | Reads positions 1 and 2 | No |
seriesAlph['c':'e'] | Reads labels c, d and e | Yes |
seriesAlph[1:3] = 50 | Writes 50 into positions 1 and 2 | No |
seriesAlph['c':'e'] = 500 | Writes 500 into labels c, d and e | Yes |
seriesCapCntry[::-1] | Prints the whole series in reverse order | Not applicable |
Question 8(b) is the reverse-order slice and Question 7(e) asks for the alphabets e to p from EngAlph. Both are one-line answers once you know which bracket form to pick.
Attributes and Methods of a Series Every Class 12 Student Must Memorise
An attribute is a property you read off the series without brackets. A method is a function you call with brackets. Question 7 walks through most of this table, so learn which of the two each name is.
| Name | Attribute or method | What it gives |
|---|---|---|
name | Attribute | Sets a name for the series, printed as Name in the output |
index.name | Attribute | Sets a name for the index column |
values | Attribute | Prints only the list of values, without the labels |
size | Attribute | The number of values in the series |
empty | Attribute | True when the series has no values, False otherwise |
head(n) | Method | The first n values; n is 5 when you leave it out |
tail(n) | Method | The last n values; n is 5 when you leave it out |
count() | Method | The number of values that are not NaN |
Two of these are asked as a pair almost every year. size counts every value, while count() skips the NaN entries. On a series holding 12, NaN and 10, size gives 3 and count() gives 2. Question 7(f) and 7(g) then ask for the first ten and the last ten alphabets, which is simply EngAlph.head(10) and EngAlph.tail(10).
Mathematical Operations on Series and Why NaN Appears in the Output
You can add, subtract, multiply and divide two series with the normal operators. Pandas does not work position by position here. It matches the labels first, then applies the operation. Any label that is missing on one side produces NaN, which stands for a missing value.
Take the two series NCERT uses. seriesA holds 1 to 5 against labels a to e. seriesB holds 10, 20, -10, -50 and 100 against labels z, y, a, c and e. Only a, c and e are common, so only those three give a number.
| Label | From seriesA | From seriesB | seriesA + seriesB |
|---|---|---|---|
| a | 1 | -10 | -9.0 |
| b | 2 | missing | NaN |
| c | 3 | -50 | -47.0 |
| d | 4 | missing | NaN |
| e | 5 | 100 | 105.0 |
| y | missing | 20 | NaN |
| z | missing | 10 | NaN |
To stop NaN from appearing, call the method form instead of the operator and pass fill_value. seriesA.add(seriesB, fill_value=0) treats every missing entry as 0, so label b returns 2.0 instead of NaN. The same parameter works with sub(), mul() and div(). Question 6(e) asks you to subtract, multiply and divide Vowels by Vowels1, and Question 6(f) then changes the labels of Vowels1 to capitals, which breaks the alignment on purpose.
Vowels + Vowels1uses the operator and leaves NaN wherever a label is missing.Vowels.add(Vowels1, fill_value=0)replaces the missing entries with 0 before adding.Vowels1.index = ['A','E','I','O','U']renames all five labels in one statement.- After that rename, adding the two series gives ten rows and every one of them is NaN.
Pandas Series Against NumPy ndarray: The Four Differences NCERT Lists

The chapter closes with a comparison table, and CBSE has lifted questions straight from it. Learn it as four clean points rather than as prose.
| Point | Pandas Series | NumPy ndarray |
|---|---|---|
| Index | You can define your own labels, either numbers or letters | Reached by integer position only |
| Order of indexing | Elements can be indexed in descending order too | Indexing starts at zero and the index is fixed |
| Unmatched data | NaN is generated when two series do not line up | There is no NaN, and alignment simply fails |
| Memory | Needs more memory | Occupies less memory |
One extra line from the same section is worth adding to a five-mark answer. Pandas allows non-unique index values, and an error is raised only when you attempt an operation that cannot handle duplicates.
Data Handling using Pandas Series Weightage Compared Across Class 12 Informatics Practices Chapters
The Informatics Practices theory paper is 70 marks split across four units. Series is the first of the three chapters inside Unit 1, and it feeds the DataFrame chapter that follows it. The table below shows where it sits against the rest of the book.
| Chapter | Topic | Approximate theory marks |
|---|---|---|
| Chapter 1 | Querying and SQL Functions | 25 marks |
| Chapter 2 | Data Handling using Pandas Series | 8 to 10 marks |
| Chapter 3 | Data Handling using Pandas DataFrame | 10 to 12 marks |
| Chapter 4 | Plotting Data using Matplotlib | 4 to 6 marks |
| Chapter 5 | Introduction to Computer Networks | 7 marks |
| Chapter 6 | Societal Impacts | 8 marks |
The chapter also feeds the practical file and the viva, where an examiner can ask you to build a series on the spot. Time spent here pays twice.
Common Mistakes Students Make in the Data Handling using Pandas Series Chapter
Check your answer sheet for these six errors before you hand it in.
- Treating a label slice like a position slice. A label slice includes the end label; a position slice does not.
- Assuming two series add position by position. Pandas matches the labels first, so unmatched labels give NaN.
- Writing
size()andempty()with brackets. Both are attributes, so they take no brackets. - Using
sizewhen the question says to ignore blanks.count()is the one that skips NaN. - Passing an index list of the wrong length, which raises a ValueError instead of building the series.
- Forgetting
import numpy as npbefore building MonthDays from an array in Question 5(e).
Also Check: Read your statement backwards from the closing bracket. Counting brackets first catches most careless errors in under ten seconds.
Student Feedback on the Data Handling using Pandas Series Chapter
What 12,180 students told us about learning Pandas Series.
- 71% of students rated index alignment and NaN as the hardest part of the chapter.
- 4 out of 5 students said the label slice against position slice rule was the one they got wrong in the first mock.
- The most-skipped part was Question 6(f), the label rename, left blank by about 19% of students.
- Students who typed out all five series from Question 5 finished the chapter in about 4 hours.
Source: Collegedunia Class 12 Informatics Practices student poll conducted before the 2026-27 board exams. Sample of 12,180 students from CBSE schools across 14 states.
Solved Example from Exercise Question 5 with Step-by-Step Working
Question 5 asks for five series in one go. Here is the full working, written the way it should appear in your answer sheet, with the import lines counted as part of the answer.
- Import both libraries.
import pandas as pdandimport numpy as np - EngAlph with 26 alphabets and default labels.
EngAlph = pd.Series(list('abcdefghijklmnopqrstuvwxyz')) - Vowels with five zeros.
Vowels = pd.Series([0,0,0,0,0], index=['a','e','i','o','u']), thenVowels.emptyreturns False because the series does hold values. - Friends from a dictionary.
Friends = pd.Series({'Reema':11,'Kabir':12,'Neha':13,'Aman':14,'Diya':15}), so the names become the labels. - MTseries, an empty series.
MTseries = pd.Series(), thenMTseries.emptyreturns True. - MonthDays from a NumPy array.
MonthDays = pd.Series(np.array([31,28,31,30,31,30,31,31,30,31,30,31]), index=range(1,13)) - Check the build.
print(MonthDays.size)gives 12, which confirms the labels and the values are of equal length.
Each statement carries its own mark, so write every one on a fresh line even when two of them look almost the same. The examiner marks step by step, not answer by answer.
How to Use the Data Handling using Pandas Series Solutions Page Most Effectively
Reading pandas code is not the same as writing it. Split your revision into three short blocks so you type more than you read.
- Block 1, 30 minutes: learn the attribute and method table by heart. Cover the third column and test yourself.
- Block 2, 45 minutes: build the five series from Question 5 in Python and print each one.
- Block 3, 45 minutes: solve Questions 6, 7 and 8 on paper without looking, then check them here.
Repeat Block 3 one week later. Students who redo the slicing questions a second time make far fewer end-label errors in the board paper.
All Data Handling using Pandas Series Exercise Questions with Step-by-Step Solutions
Every Series question from the NCERT back exercise is answered in full on the question bank page, with the statement, its printed output and a short note on why each bracket form is used.
Question bank: All Data Handling using Pandas Series Class 12 Questions with Solutions
Covers exercise questions 1, 3, 4, 5, 6, 7 and 8, the six Activity sets from the chapter, and the Think and Reflect question on the pd alias.
Related Class 12 Informatics Practices Resources for Data Handling using Pandas Series
Pair the solutions with the notes and the handwritten notes. The notes explain the theory, the handwritten notes are for the last hour before the paper, and the book PDF gives you the original tables and outputs to check against.
| Resource | Best used for |
|---|---|
| Data Handling using Pandas Series Class 12 Notes | Topic-wise theory with every attribute and method explained |
| Data Handling using Pandas Series Class 12 Handwritten Notes | One-shot revision in a topper's own handwriting |
| Data Handling using Pandas Series Class 12 Book PDF | The original NCERT chapter with all the printed outputs |
NCERT Solutions for Class 12 Informatics Practices: All Chapters
Solutions for every chapter of the Class 12 Informatics Practices book are listed below. The highlighted row is the chapter you are on.
| Chapter | Resource |
|---|---|
| Chapter 1 | Querying and SQL Functions NCERT Solutions |
| Chapter 2 | Data Handling using Pandas Series NCERT Solutions |
| Chapter 3 | Data Handling using Pandas DataFrame NCERT Solutions |
| Chapter 4 | Plotting Data using Matplotlib NCERT Solutions |
| Chapter 5 | Introduction to Computer Networks NCERT Solutions |
| Chapter 6 | Societal Impacts NCERT Solutions |
Data Handling using Pandas Series Class 12 Informatics Practices NCERT Solutions FAQs
Questions Students Ask About Data Handling using Pandas Series
Ques. What is a Series in Pandas?
Ans. A Series is a one-dimensional array that holds a sequence of values of any data type, such as int, float, string or list. Every value carries a data label with it, and that label is called its index. If you do not set the labels yourself, Pandas numbers them from 0 to N minus 1. You can picture a Series as a single column of a spreadsheet.
Ques. How is a Series different from a 1-D NumPy array, a list and a dictionary?
Ans. A Series lets you define your own labels, while a 1-D array can only be reached by integer position. A Series lines up two sets of data by label and fills the gaps with NaN, which an array cannot do. A list has no labelled index and joins end to end when added, while two series add their matching values. A dictionary has keys and values but no slicing and no element-wise maths, though its keys can become the index of a Series.
Ques. How is a DataFrame related to a Series?
Ans. A DataFrame is a two-dimensional labelled structure with both a row index and a column index. Each column of a DataFrame is itself a Series, and all those columns share the same row labels. So a DataFrame can be seen as a dictionary of Series objects placed side by side.
Ques. What are the different ways of creating a Pandas Series?
Ans. NCERT shows four sources. You can build a Series from scalar values in a list, from a list with your own index labels, from a one-dimensional NumPy array, or from a dictionary whose keys become the index. Calling pd.Series() with nothing inside creates an empty Series, and its empty attribute then returns True.
Ques. Why does NaN appear when two series are added?
Ans. Pandas matches the index labels before it adds anything. If a label is present in one series but missing in the other, there is nothing to add, so the result is marked NaN. Using the method form with fill_value avoids this. For example, seriesA.add(seriesB, fill_value=0) treats the missing entries as 0 and returns a number instead of NaN.
Ques. What is the difference between slicing by position and slicing by label?
Ans. A positional slice leaves out the value at the end position, so only end minus start values are returned. A labelled slice includes the value at the end label. On a series with labels India, USA, UK and France, the slice [1:3] returns two rows while the slice from USA to France returns three rows.
Ques. What is the difference between the size attribute and the count method?
Ans. The size attribute counts every value in the Series, including the missing ones. The count method returns only the values that are not NaN. On a series holding 12, NaN and 10, size gives 3 and count() gives 2. Note that size is an attribute and takes no brackets, while count is a method and does.
Ques. What do head() and tail() return in a Series?
Ans. head(n) returns the first n values of the Series and tail(n) returns the last n. If you leave n out, both take 5 by default. So EngAlph.head(10) prints the first ten alphabets and EngAlph.tail(10) prints the last ten, which is exactly what Question 7 asks for.
Ques. What happens if the index list is shorter than the value list?
Ans. Python raises a ValueError and the Series is not created. Passing four values with only three labels prints the message Length of passed values is 4, index implies 3. The rule is simple: the number of labels must equal the number of values.
Ques. What is the difference between a Pandas Series and a NumPy ndarray?
Ans. A Series lets you set your own labels, which may be numbers or letters, and it can be indexed in descending order. An ndarray is reached by integer position only and its index is fixed from zero. When two series do not line up, Pandas returns NaN, whereas an ndarray has no NaN and alignment simply fails. A Series needs more memory than an ndarray.
Ques. Are these Class 12 Informatics Practices solutions according to the 2026-27 syllabus?
Ans. Yes. Every statement and output on this page follows the 2026-27 CBSE syllabus and the current NCERT print of the Pandas Series chapter, including the seriesCapCntry example, the seriesA and seriesB addition table, and the comparison table between a Series and a NumPy array.







Comments