Q1:
2026: 24 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
_______________ attribute name is used to display a NumPy ndarray having all the values in the DataFrame, without the axes labels.
2026: 24 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
_______________ attribute name is used to display a NumPy ndarray having all the values in the DataFrame, without the axes labels.
2026: 23 May Shift 2
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
Which statements about Pandas 'Series' are TRUE?
A. A Series can have duplicate index labels.
B. The data in a Series must be homogeneous.
C. A Series cannot contain NaN values.
D. The index can be of any data type.
2026: 23 May Shift 2
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
Arrange the following steps to create the series with a NumPy Array:
A. import pandas as pd
B. series3 = pd.Series(array1)
C. array1 = np.array([1,2,3,4])
D. print(series3)
2026: 23 May Shift 2
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
What would be correct syntax to select elements at positions 0 and 2 from a Series 's'.
2026: 23 May Shift 2
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
Which query generates the DataFrame 'df_orders' to show orders with "Quantity" greater than 10 and "Price" less than 50?
2026: 23 May Shift 2
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
____________method appends rows of the second DataFrame at the end of the first DataFrame.
2026: 23 May Shift 2
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
Indexing in Series are of two types: _________ index and ______________index.
2026: 23 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
Which function is used to sort a Pandas DataFrame in descending order based on a column?
2026: 23 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
______________ gives the transpose of a DataFrame.
2026: 23 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
______________method can also be used to change the data values of a row to a particular value.
2026: 23 May Shift 1
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
With reference to the parameter header of pd.read_csv(), which of the parameter values allow the column names to be inferred from the first line of csv file?
A. header =1
B. header = 0
C. header = True
D. header = False
2026: 23 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
How do you select rows from a DataFrame 'df' where the 'Salary' column is greater than 50000?
2026: 23 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
| Texas | California | |
|---|---|---|
| 1 | 44 | 45 |
| 2 | 55 | 34 |
| 3 | 23 | 67 |
| 4 | 67 | 33 |
For the DataFrame (df) given above, which of the following are correct ways to access column 'Texas'?
A. df['Texas']
B. df('Texas')
C. df.Texas
D. df.['Texas']
2026: 23 May Shift 1
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
What will be the output of the following code?
seriesCapCntry = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'], index=['India', 'USA', 'UK', 'France'])
seriesCapCntry[1:3]
2026: 21 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
What is the command to drop a column in a DataFrame 'df'?
2026: 21 May Shift 1
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
Arrange the following steps in correct order to create a DataFrame from a list of dictionaries.
(A) Create a list of dictionaries
(B) Use the pd.DataFrame() constructor
(C) Pass the list of dictionaries as an argument
(D) Execute the query
2026: 21 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
When adding two Series objects with a common index, but one of them has a missing value, then what will be the default value in front of missing index?
2026: 21 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
Data elements in a DataFrame can be accessed using:
2026: 21 May Shift 1
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
What will be the default value of parameter 'header' while loading a 'csv' file in to a DataFrame?
2026: 21 May Shift 1
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
Which of the following statements are TRUE about Numpy?
(A) Numpy needs less memory than Pandas Series.
(B) Numpy arrays define their own labeled index to access elements.
(C) Numpy arrays are homogeneous arrays.
(D) There is the concept of NaN values in Numpy.
2026: 20 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
Match List-I with List-II
| List-I | List-II |
|---|---|
| (A) df.index | (I) Display the first 'n' rows of the DataFrame |
| (B) df.dtypes | (II) Display a tuple representing the dimensionality |
| (C) df.head | (III) To display row labels |
| (D) df.size | (IV) To display type of each column in the DataFrame |
2026: 20 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
Seriescntry = pd.Series(['India', 'Canada', 'Brazil', 'Australia', 'USA', China', 'Russia']) is created. If slicing is performed using Seriescntry = Seriescntry[3: 5], then what will be the output?
2026: 20 May Shift 1
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
Which of the following statements are TRUE for NumPy Arrays?
(A) There is no concept of NaN values in NumPy.
(B) NumPy occupy less memory than a Series.
(C) The indexing starts with zero for the first element in NumPy.
(D) NumPy arrays are accessed by their integer position using numbers or letters.
2026: 20 May Shift 1
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
Consider the two series given below:
Series A
| index | ValuesA |
|---|---|
| a | 10 |
| b | NaN |
| c | 20 |
| d | NaN |
| e | 10 |
Series B
| index | ValuesA |
|---|---|
| a | 10 |
| b | 15 |
| c | 20 |
| d | NaN |
| e | 14 |
What will be the output of SeriesA.mul(SeriesB) in Python?
2026: 20 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
A DataFrame ResultDF is created below:
| Arnab | Ramit | Samridhi | Riya | Mallika | |
|---|---|---|---|---|---|
| Maths | 90 | 92 | 89 | 81 | 94 |
| Science | 91 | 81 | 91 | 71 | 95 |
| Hindi | 97 | 96 | 88 | 67 | 99 |
| Hindi | 97 | 89 | 78 | 60 | 45 |
Identify the correct command to remove the duplicate row labelled ‘Hindi’.
2026: 20 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
| Sumit | Jyoti | Astha | Rakesh | |
|---|---|---|---|---|
| Maths | 90 | 85 | 68 | 90 |
| Physics | 92 | 87 | 75 | 87 |
| Chemistry | 91 | 79 | 71 | 71 |
| Computer Science | 88 | 76 | 84 | 88 |
A DataFrame 'df' is created as above. Which of the following syntax is the correct way for adding a row 'English' to this DataFrame?
2026: 19 May Shift 1
Informatics Practices
Series & DataFrames
Easy
Informatics Practices
Match List-I with List-II with respect to Pandas Series attributes
| List-I - Attribute | List-II - Functioning |
|---|---|
| (A) series.empty | (I) assigns a name to the series |
| (B) series.name | (II) checks whether a series is empty or not |
| (C) series.index.name | (III) prints a list of the values in the series |
| (D) series.values | (IV) assigns a name to the index of the series |
2026: 19 May Shift 1
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
Match List-I with List-II
| List-I | List-II |
|---|---|
| (A) DataFrame | (I) supports non-unique index values |
| (B) Series | (II) multidimensional homogeneous data structure |
| (C) Pandas | (III) one-dimensional labelled data structure |
| (D) Ndarray | (IV) two-dimensional labelled heterogenous data structure |
2026: 19 May Shift 1
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
What will be the output of the following python code?
import numpy as np
import pandas as pd
array1 = np.array([10,20,30])
array2 = np.array([100,200,300])
array3 = np.array([-10,-20,-30, -40])
dFrame = pd.DataFrame([array1, array3, array2], columns=[ 'A', 'B', 'C', 'D'])
print(dFrame)
2026: 19 May Shift 1
Informatics Practices
Series & DataFrames
Medium
Informatics Practices
Choose the correct output of the following Python code:
import pandas as pd
import numpy as np
series1 = pd.Series(np.arange(10,16,1),index = ['a', 'b', 'c', 'd', 'e', 'f'])
print(series1[2:4])