In this article, you will get important QnA Pandas Series IP Class 12. For all of these questions, consider that Pandas and NumPy modules have been imported as:

import pandas as pd
import numpy as np

Watch this video before starting this article to understand about series:

IP Class 12 Pandas Important Questions – Very Short and Short Answer Questions

Let’s start the article QnA Pandas Series IP Class 12 with very short and short answer questions.

[1] Identify the Pandas Data Structure: 

(i) Represents a single column  – Series

(ii) Heterogeneous  2D Data- Dataframe 

[2] Which module is required to be installed to create a series?

Ans.: Python requires installing the pandas module to create series.

[3] Write the statement to import pandas for the python program to create a series.

Ans.: Pandas can be imported into python program using the following two ways:

  1. import pandas as pd
  2. from pandas import *

[4] Who developed the module pandas? When and Where?

Ans.: The pandas module was developed by Wes McKinney in 2008 at AQR Capital Management.

[5] Which languages are used to develop the module pandas?

Ans.: The developer used Python, Cython and C language to develop the Pandas module. 

[6] What is the full form of Pandas?

Ans.: Pandas stands for Panel Data System.

[7] What was the main motive behind developing the pandas module?

Ans.: The main motive behind developing the pandas was there was a requirement for high-performance, flexible tools to perform quantitative analysis on financial data. 

[8] Write any four characteristics/features of the Pandas module.


  1. Pandas support multiple formats to analyse data easily
  2. It offers the best tool for input and output data
  3. It also provides easy filtering data according to conditions
  4. Allows to set a subset of data from the given data set
  5. It also supports the group by and statistics functions

[9] Explain the following series attributes with an example:

  1. index – Returns the indices along with their datatype of specified series.
    • Ex.: s.index
    • If s is a series object holds the values 11,12,13 and indices has been given as [‘A’,’B’,’C’], then the output will be Index([‘A’,’B’,’C’],dtype=’Object’])
  2. values – Returns the values in form of the list from the specified series
    • Ex.: s.value
    • The output will be : [11,12,13]
  3. dtype – Returns the data types of the values given in the specified series
    • Ex.: s.dtype
    • The output will be int64
  4. nbytes – Returns the n no. of bytes of the given data values from the specified series
    • Ex.: s.nbytes
    • The output will be 24, 8 Bytes for each value
  5. size: Returns the size (no. of elements) for the specified series
    • Ex.: s.size
    • The output will be 3
  6. hasnans: Returns True if the series has any NaN value otherwise False
    • Ex. s.hasnans
    • The output will be False
  7. Used to assign new index name to the existing index
    • Ex.’NewIndex’
    • print(
    • The output will be : NewIndex
  8. shape: Returns the tuple of rows for the specified series
    • Ex. s.shape
    • The output will be : (3,)
  9. ndim: It returns the number of dimensions of the specified series. In series, it is always 1
    • Ex. s.ndim
    • The output will be : 1
  10. empty: It returns True if the series is empty otherwise False
    • Ex. s.empty
    • The output will be: False

QnA Pandas Series IP Class 12 – Output  Questions

1. Consider the following series object Named ‘Ser’:
    0       578
    1        235
    2       560
    3       897
    4       118
What will be the output of following statements?:
i) print(ser.index)     –> RangeIndex(start=0, stop=5, step=1)
ii) print(ser.values)  –> [578 235 560 897 118]   
iii) print(ser.shape) –> (5,)     
iv) print(ser.size)      –> 5
v) print(ser[3])          –> 897
vi) print(ser.hasnans)  –> False
vii) print(ser.empty)    –> False
viii) print(ser.ndim)  –> 1
ix) ser[2]= 999                        
      print(ser[2],ser[4]) –>   999 901                                 
x) import pandas as pd
       print(ser[: :-1]) 
2 560
3 897
4 118
dtype: int64
0 578
1 235
2 560
dtype: int64
4 118
3 897
2 560
1 235
0 578
dtype: int64
2. fruits = [‘Apple’,’Mango’, ‘Banana’, ‘Grapes’]
    r2019 = pd.Series([100,80,30,60], index = fruits)
    r2020 = pd.Series([150,100,50,80], index = fruits)
    print (“Difference:”)
    print (r2020 – r2019)
    r2020 = r2019 + 100
    print (r2020)
Apple 50
Mango 20
Banana 20
Grapes 20
dtype: int64
Apple 200
Mango 180
Banana 130
Grapes 160
dtype: int64
3. ser = pd.Series([5987,5634,3450,2500,1500,7899,6432,8756,9123,4400])
    print(ser==1500 or ser==1500)
0 True
1 True
2 False
3 False
4 False
5 True
6 True
7 True
8 True
9 False
dtype: bool
4. l=[]
    for i in range(1,11,2):
0 1
1 3
2 5
3 7
4 9
dtype: int64
0 1
1 3
2 5
3 7
4 9
5 1
6 3
7 5
8 7
9 9
10 1
11 3
12 5
13 7
14 9
dtype: int64
5. ser = pd.Series(range(1,10))
0 1
1 2
2 3
3 4
dtype: int64
4 5
5 6
6 7
7 8
8 9
dtype: int64
0 1
1 2
2 3
3 4
4 5
dtype: int64
import pandas as pd

0 4
1 6
2 8
dtype: int64

0 4
1 6
2 8
3 4
4 6
5 8
dtype: int64

0 8
1 12
2 16
dtype: int64


import pandas as pd


0 Amit
1 Bhargav
2 Charmi
dtype: object

Series([], dtype: object)

3 Divya
4 Falguni
5 Gayatri
dtype: object

5 Gayatri
4 Falguni
3 Divya
dtype: object

In the next section of QnA Pandas Series IP Class 12 we will see error-based questions:

Error Questions (Assume that all required packages are imported)

1. ser = pd.series(range(4))
Ans.: In the statement pd.series, s of series should be capitalized.
2. ser = pd.Series(11,22,33,55, index = range(3))
Ans.: The values (11,22,33,55) in series should be passed in a list form.
3. l = np.array([‘C’,’C++’,’Java’,’Python’])
    s = pd.Series(l,index=[501,502,503,504])
Ans. Line no. 3, the index should be enclosed with more square brackets. 
4. ser = pd.Series(range(1,12,2),index=list(‘pqrst’))
Ans. Indexes are not provided properly. The elements of series are 6, where indexes are 5.
The next section of QnA Pandas Series IP Class 12 is based on Conceptual Questions, have a look:

(1) What are pandas? Explain in detail.

  • Pandas word derived from PANel Data System.
  • It becomes popular for data analysis.
  • It provides highly optimized performance with back end source code is purely written in C or Python.
  • It makes a simple and easy process for data analysis. 

(2) List out common data structures supported by Pandas.

  • Series
  • Dataframe

(3) What is a panda series? Explain with a suitable example.

  • Series is one-dimensional data structure. 
  • It contains an array of data.
  • Series contains two main components: An Index, An indexed associated with an array

(5) How to create an empty series? Explain with a suitable example.

  • To create an empty series use Series() method with Pandas object. 
  • Observe this code:
import pandas as pd
ser = pd.Series()

(6) How to create a series with an example: A python sequence, NumPy Array, A dictionary, A scalar value

  • A python sequence
import pandas as pd
  • NumPy Array
import pandas as pd
import numpy as np
arr = np.arange(1,10,1)
ser = pd.Series(arr)
  • A scalar value
import pandas as pd
ser = pd.Series(5,range(1,5))

(7) Name the function that displays the top and bottom elements of a series. Explain with an example.

Ans.: The functions that display the top and bottom n elements of a series are head() and tail() respectively. 


import pandas as pd




By default, this function will display 5 elements. 

(8) What is the use of the drop() and reindex() method? Explain with an example.

Follow this link for answers:

Download Free PDF easy notes for Data handling using Pandas-I Series Class 12

In the next section of QnA Pandas Series IP Class 12, do practice for program-based questions:
1. Write a program to store a population of 4 cities with an index of the previous 4 years. Write functions to do the following:
    i) Print the average population of the recent two years.
   ii) Print the grand total of populations.
  iii) Print the highest population.
  iv) Print the difference between the first year and last year.
    v) Delete entry of one year from the series.
import pandas as pd
for year in range(y,y-4,-1):
     p=int(input(“Enter the population:”))
#Creating Series
#Print Average
print(“Average population of recent two years:”,s.head(2).index,s.head(2).mean())
#Sum of population
print(“Sum of population of all cities:”,s.sum())
print(“Maximum population:”,s.max())
#Defference First year and last year
print(“Difference between First year and Last Year:”,s[2021]-s[2018])
#Delete data for specific year
yr=int(input(“Enter year to delete:”))
print(“Series Data After Deletion:”)
2. Write a program to store employees’ salary data for one year. Write functions to do the following: 
   i) Display salary data for every 4th month.
  ii) Display salary of any one month.
 iii) Apply increment of 10% into salary for all values.
 iv) Give 2400 arrear to employees in April month.

import pandas as pd


#Salary of data for every 4 month
print(“Salary of every 4th month:”)

#Display the salary of a specific month
m=input(“Enter month to display salary:”)
if m in s.index:
print(“Enter valid month”)

#Increment 10% for all months

#Add arrear for april
print(“Salary with Arrear”,s[‘Apr’])

Watch this video for more understanding of  Pandas Series IP Class 12 in one shot. 

Practical List of IP class 12 Programs with solutions

Click here to access all the contents of IP class 12:

IP Class 12

3 thoughts on “Important QnA Pandas Series IP Class 12”
  1. Hello sir good evening
    Can you provide the assignment answers

  2. Subscribed but where is answers

Leave a Reply

Your email address will not be published. Required fields are marked *