Pandas Series MCQs | 25 Practice Questions with Answers | CBSE Class 12 Informatics Practices (IP)
Class 12 · Informatics Practices
Pandas Series MCQs (25 Questions)
Practice these multiple-choice questions to strengthen your understanding of Pandas Series. Click Show Answer to reveal the correct answer and explanation.
Q1. Which Pandas data structure is one-dimensional?
A. DataFrame
B. Series
C. Panel
D. Table
Show Answer
Answer: B. Series
Explanation: A Series is a one-dimensional labeled array capable of storing data of any type.
Q2. Which statement is used to create a Series in Pandas?
A. pd.Series()
B. pd.DataFrame()
C. Series.create()
D. pd.Table()
Show Answer
Answer: A. pd.Series()
Explanation: The Series() constructor is used to create a Pandas Series.
Q3. A Pandas Series can be created from:
A. NumPy ndarray
B. Dictionary
C. Scalar Value
D. All of these
Show Answer
Answer: D. All of these
Explanation: A Series can be created from multiple data sources, including ndarray, dictionary, scalar values, and lists.
Q4. Which library provides the ndarray object commonly used to create a Series?
A. Matplotlib
B. NumPy
C. CSV
D. Random
Show Answer
Answer: B. NumPy
Explanation: NumPy provides the ndarray data structure used by Pandas.
Q5. Which statement creates a Series from a list?
A. pd.Series([10,20,30])
B. pd.DataFrame([10,20,30])
C. Series([10,20,30])
D. create.Series()
Show Answer
Answer: A.
Explanation: The pd.Series() constructor creates a Series from a list.
Q6. Which statement creates a Series from a dictionary?
A. pd.Series({'A':10,'B':20})
B. pd.DataFrame({'A':10})
C. dict.Series()
D. Series.dict()
Show Answer
Answer: A.
Explanation: A dictionary can be directly converted into a Pandas Series.
Q7. When a Series is created from a dictionary, the dictionary ______ become the index.
A. Values
B. Keys
C. Items
D. Objects
Show Answer
Answer: B. Keys
Explanation: Dictionary keys become index labels, while dictionary values become Series values.
Q8. What happens when a Series is created using a scalar value?
A. Only one value is stored.
B. The scalar value is repeated for all specified index positions.
C. An error occurs.
D. The Series becomes empty.
Show Answer
Answer: B.
Explanation: A scalar value is repeated for every index provided.
Q9. Which parameter specifies custom labels while creating a Series?
A. columns
B. labels
C. index
D. names
Show Answer
Answer: C. index
Explanation: The index parameter specifies custom labels.
Q10. Which statement correctly creates a Series with custom index?
A. pd.Series([10,20], index=['A','B'])
B. pd.Series(index=[10,20])
C. Series(index)
D. pd.DataFrame(index)
Show Answer
Answer: A.
Explanation: The index parameter assigns custom labels to Series elements.
Q11. Which method displays the first five values of a Series by default?
A. first()
B. head()
C. top()
D. display()
Show Answer
Answer: B. head()
Explanation: head() returns the first five records unless another value is specified.
Q12. Which method displays the last five values of a Series by default?
A. last()
B. bottom()
C. tail()
D. end()
Show Answer
Answer: C. tail()
Explanation: tail() displays the last five elements by default.
Q13. What is the default number of records returned by head()?
A. 3
B. 5
C. 10
D. All records
Show Answer
Answer: B.
Explanation: By default, head() returns the first five records.
Q14. What is the default number of records returned by tail()?
A. 2
B. 4
C. 5
D. 6
Show Answer
Answer: C.
Explanation: tail() returns the last five records unless another number is specified.
Q15. Which statement is TRUE about a Pandas Series?
A. It supports indexing.
B. It supports slicing.
C. Mathematical operations can be performed on it.
D. All of these.
Show Answer
Answer: D. All of these.
Explanation: A Series supports indexing, slicing, mathematical operations, and many built-in functions.
Q16. Which operation can be performed directly on a Pandas Series?
A. Addition (+)
B. Subtraction (-)
C. Multiplication (*)
D. All of these
Show Answer
Answer: D. All of these
Explanation: Pandas Series supports element-wise mathematical operations such as addition, subtraction, multiplication, and division.
Q17. If a Series contains [10, 20, 30], what will be the result of Series + 5?
A. [15, 25, 35]
B. [10, 20, 30, 5]
C. Error
D. [5, 5, 5]
Show Answer
Answer: A.
Explanation: The value 5 is added to every element of the Series.
Q18. If a Series contains [2, 4, 6], what will be the output of Series * 2?
A. [2, 4, 6, 2]
B. [4, 8, 12]
C. Error
D. [2, 8, 12]
Show Answer
Answer: B.
Explanation: Each element of the Series is multiplied by 2.
Q19. Which of the following is used to access a single value from a Series?
A. Index
B. Loop only
C. Function only
D. Dictionary
Show Answer
Answer: A. Index
Explanation: A value in a Series is accessed using its index label or position.
Q20. Which operation retrieves a subset of consecutive elements from a Series?
A. Selection
B. Slicing
C. Renaming
D. Appending
Show Answer
Answer: B. Slicing
Explanation: Slicing is used to retrieve a range of elements from a Series.
Q21. Which statement is TRUE about indexing in a Series?
A. Every element has an associated index.
B. Index values are always numeric.
C. Indexing is not supported.
D. Only string indexes are allowed.
Show Answer
Answer: A.
Explanation: Every Series element has an index, which can be numeric or custom labels.
Q22. Which of the following can be used as custom index labels in a Series?
A. Strings
B. Numbers
C. Dates
D. All of these
Show Answer
Answer: D. All of these
Explanation: Pandas allows different types of values to be used as index labels.
Q23. A teacher stores the marks of five students in a Series. To display only the first three records, which statement should be used?
A. head(3)
B. tail(3)
C. first(3)
D. show(3)
Show Answer
Answer: A.
Explanation: head(3) displays the first three records of the Series.
Q24. Which statement correctly describes a Pandas Series?
A. It stores one-dimensional labeled data.
B. It supports indexing and slicing.
C. It supports mathematical operations.
D. All of these.
Show Answer
Answer: D. All of these.
Explanation: A Series is a one-dimensional labeled data structure that supports indexing, slicing, and arithmetic operations.
Q25. Which statement best summarizes the features of a Pandas Series?
A. It can be created from ndarray, dictionary, or scalar values.
B. It supports custom indexes, selection, indexing, and slicing.
C. Mathematical operations can be performed directly on its elements.
D. All of these.
Show Answer
Answer: D. All of these.
Explanation: A Pandas Series is a flexible one-dimensional labeled array that supports multiple creation methods, indexing, slicing, and vectorized mathematical operations.
Answer Key
| Q.No. | Answer | Q.No. | Answer | Q.No. | Answer |
|---|---|---|---|---|---|
| 1 | B | 11 | B | 21 | A |
| 2 | A | 12 | C | 22 | D |
| 3 | D | 13 | B | 23 | A |
| 4 | B | 14 | C | 24 | D |
| 5 | A | 15 | D | 25 | D |
| 6 | A | 16 | D | ||
| 7 | B | 17 | A | ||
| 8 | B | 18 | B | ||
| 9 | C | 19 | A | ||
| 10 | A | 20 | B |
Practice Tips
- Remember the different ways to create a Series:
- From a List
- From a NumPy ndarray
- From a Dictionary
- From a Scalar Value
- Know the commonly used constructor:
pd.Series()
- Understand indexing concepts:
- Default Index → 0, 1, 2, ...
- Custom Index → User-defined labels using the
indexparameter.
- Revise frequently used methods:
head()→ Displays the first five records by default.tail()→ Displays the last five records by default.
- Practice mathematical operations:
- Addition (
+) - Subtraction (
-) - Multiplication (
*) - Division (
/)
These operations are performed element-wise on the Series.
- Addition (
- Differentiate the key operations:
- Selection → Access specific element(s).
- Indexing → Retrieve data using index labels or positions.
- Slicing → Retrieve a range of consecutive elements.
- CBSE Tip: Questions often test Series creation methods, use of the
indexparameter,head(),tail(), indexing, slicing, and simple arithmetic operations on Series.