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:
Topics Covered
IP Class 12 Pandas important Questions – 1 Mark
Lets start the article QnA Pandas Series IP Class 12 with 1 mark questions.
[1] Identify the Pandas Data Structure:
(i) Represents a single column
(ii) Heterogenous
QnA Pandas Series IP Class 12 – Output Questions
ser=pd.Series([578,235,560,897,118])
print(ser[2:])
print(ser[0:3])
print(ser[: :-1])
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
Apple 50
Mango 20
Banana 20
Grapes 20
dtype: int64
Apple 200
Mango 180
Banana 130
Grapes 160
dtype: int64
1 True
2 False
3 False
4 False
5 True
6 True
7 True
8 True
9 False
dtype: bool
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
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
Error Questions (Assume that all required packages are imported)
(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) How to use pandas library in a program? Illustrate the answer with an example.
- To use pandas libary in the program user need to import the pandas package.
- For example, import pandas as pd
(4) What is a panda series? Explain with a suitable example.
- Series is one dimensional data structure.
- It contain an array of data.
- Series contains two main components: An Index, An indexed associated with 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
ser=pd.Series(range(5))
- 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) Explain the attributes of the series object with an example.
(8) Name the function that displays the top and bottom elements of a series. Explain with example.
(9) What is the use of the drop() and reindex() method? Explain with example.
Follow this link for answers:
Download Free PDF easy notes for Data handling using Pandas-I Series Class 12
Practical List of IP class 12 Programs with solutions
Click here to access all the contents of IP class 12:
Hello sir good evening
Can you provide the assignment answers
Yes answers will be also, published. For explanation subscribe youtube channel -> tutorialaicsip
Subscribed but where is answers