CUET Computer/IP: Informatics PracticesSeries & DataFrames. Free, no login required.

Q1:

2026: 31 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Which of the following statement is correct to display the first 3 rows of a DataFrame 'df'?

Answer options
Option 2
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 1

Q2:

2026: 31 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Which of the following is used for label based indexing?

Answer options
Option 1
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 2

Q3:

2026: 31 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Arrange the following steps in the correct order to create a Pandas Series from a dictionary and displaying the elements.

A. import pandas as pd

B. s= pd.Series(data)

C. print(s)

D. data= {'A':10, 'B':20, 'C":30}

Answer options
Option 2
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 3

Q4:

2026: 31 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Which of the following function is used to read from a 'csv' file into a pandas ('pd' as alias) DataFrame?

Answer options
Option 3
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 4

Q5:

2026: 31 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Which of the following statement is used to export a DataFrame to 'csv' file?

Answer options
Option 1
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 5

Q6:

2026: 31 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Match the LIST-I with LIST-II

LIST-ILIST-II
A.df.loc['Science']I.Merging
B.df.loc['Maths']>90II.Slicing
C.df.loc['Maths':'Science']III.Boolean Indexing
D.df1=df1.append(df2)IV.Label based indexing
Answer options
Option 2
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 6

Q7:

2026: 29 May Shift 2

Series & DataFrames

Easy

Informatics Practices

__________ implies that column names are inferred from the first line of the file while using Pandas read_csv() function.

Answer options
Option 2
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 7

Q8:

2026: 29 May Shift 2

Series & DataFrames

Medium

Informatics Practices

What will be the output of the following commands?

seriesCapCntry = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'], index=['India', 'USA', 'UK', 'France'])

seriesCapCntry[1:3]

Answer options
Option 3
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 8

Q9:

2026: 29 May Shift 2

Series & DataFrames

Medium

Informatics Practices

Which of the statements are INCORRECT with respect to DataFrame (df) operations?

A. df['a'] = ['1','2','3','4']_____________ will add a new column 'a' in the DataFrame

B. df.loc['a'] = ['1','2','3','4']________ will add a new column 'a' to the DataFrame

C. df.drop('a', axis = 0)____________ will drop the row label 'a' from the DataFrame

D. df['a'] = ['1','2','3','4']_____________ will add a new row 'a' in the DataFrame

Answer options
Option 1
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 9

Q10:

2026: 29 May Shift 2

Series & DataFrames

Hard

Informatics Practices

Consider a DataFrame 'ResultDF' as follows:

ArnabRamitSamridhiRiyaMallika
Maths9092898194
Science9181917195
Hindi9796886799

Arrange the following commands on the basis of number of values in the output in increasing order:

A. ResultDF.loc['Science']

B. ResultDF.loc[:,'Arnab']

C. ResultDF.loc[['Science', 'Hindi']]

D. ResultDF.loc['Maths'] > 90

Answer options

Q11:

2026: 29 May Shift 2

Series & DataFrames

Easy

Informatics Practices

S_idPhysicsChemistryMaths
1674587
2586576
3594769
4667971

From the table given above, a DataFrame 'df' is created. What will be the query to fetch maximum marks in chemistry?

Answer options

Q12:

2026: 29 May Shift 2

Series & DataFrames

Medium

Informatics Practices

Considering s1 = pd.Series([2,3,np.nan,7, np.nan,9,11])

What will be the output of the following statement?

s1.dropna().tail(4)

Answer options

Q13:

2026: 29 May Shift 2

Series & DataFrames

Easy

Informatics Practices

A Series is a ________ which by default have _________ data labels.

Answer options

Q14:

2026: 29 May Shift 1

Series & DataFrames

Medium

Informatics Practices

Which of the following statements are TRUE with respect to data handling uisng Pandas?

(A) A Series is a one-dimensional array containing a sequence of values.

(B) DF = DF.drop(['Samridhi','Ramit','Riya'], axis=1) will delete the columns having labels 'Samridhi', 'Ramit' and 'Riya'.

(C) DataFrame.loc[ ] is used for label based indexing of rows in DataFrames.

(D) Pandas.DataFrame.append() method is used to merge two DataFrames.

Answer options

Q15:

2026: 29 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Arrange the following python statement for creation of Series from Dictionary:

(A) print(dict1)

(B) print(series1)

(C) dict1 = {'India': 'NewDelhi', 'UK': 'London', 'Japan': 'Tokyo'}

(D) series1 = pd.Series(dict1)

Answer options

Q16:

2026: 29 May Shift 1

Series & DataFrames

Medium

Informatics Practices

State the output of the following code fragment.

import pandas as pd

listDict = [{'a':10, 'b':20}, {'a':5, 'b':10, 'c':20}]

dF = pd.DataFrame(listDict)

print(dF)

Answer options

Q17:

2026: 29 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) DataFrame.head()(I) To display row labels.
(B) DataFrame.T(II) To display a tuple representing the dimensionality of the DataFrame.
(C) DataFrame.shape(III) Row indices and column labels of the DataFrame replace each other’s position.
(D) DataFrame.index(IV) To display the first 5 rows in the DataFrame.
Answer options

Q18:

2026: 29 May Shift 1

Series & DataFrames

Medium

Informatics Practices

Help Mohan for displaying a column of a DataFrame 'DF' as he is confused among the following options.

(A) DF.loc['COLUMN NAME']

(B) DF[COLUMN NAME]

(C) DF.COLUMN NAME

(D) DF['COLUMN NAME']

Answer options

Q19:

2026: 26 May Shift 1

Series & DataFrames

Medium

Informatics Practices

Which of the following statements are TRUE?

(A) Addition of a new row to a DataFrame 'df' can be acheived with the help of df.loc[]

(B) Pandas.DataFrame.append() method is used to merge two DataFrames.

(C) Slicing is the only way to access elements of a series.

(D) DataFrame.D gives the transpose of a DataFrame.

Answer options

Q20:

2026: 26 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Consider the following Dataframe 'df':

SubjectAmitAshuAtulArnab
Maths80858290
Science75707983
Hindi82848878
English80707981

To drop a columns having label 'Amit' and 'Atul', which of the following statement is valid?

Answer options

Q21:

2026: 26 May Shift 1

Series & DataFrames

Medium

Informatics Practices

Consider the following statement:

Country = pd.Series(['India','Nepal','Germany','Poland','USA'])

What will the following command result in?

print (Country [: : -1])

Answer options

Q22:

2026: 26 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Consider the following 'SeriesA' and 'SeriesB':

SeriesA

Index
a2
b4
c0
d8
e0
f10

SeriesB

Index
a10
b-20
c-5
d10
e100
f50

What will be the output of SeriesA * SeriesB?

Answer options

Q23:

2026: 26 May Shift 1

Series & DataFrames

Medium

Informatics Practices

In any DataFrame 'df', if we want to perform sorting on a column name then which of the following is the correct syntax to do it?

Answer options

Q24:

2026: 26 May Shift 1

Series & DataFrames

Medium

Informatics Practices

Consider a DataFrame 'df' given below.

SubjectAmitAshuAtulArnab
Maths80858290
Science75707983
Hindi82848878
English80707981

Which of the following statement will display name of the student and True or False depending on satisfying the condition of student having scored more than 90 in Maths?

Answer options

Q25:

2026: 26 May Shift 1

Series & DataFrames

Easy

Informatics Practices

If data needs to be imported in a DataFrame from a csv file where values are separated via space, then which of the following syntax would be correct?

Answer options

Q26:

2026: 24 May Shift 1

Series & DataFrames

Medium

Informatics Practices

In data handling, pandas support ________ index values.

Answer options

Q27:

2026: 24 May Shift 1

Series & DataFrames

Medium

Informatics Practices

While appending two dataframes, if we want to raise error in case row labels are duplicate, we shall use which parameter of append() method?

Answer options

Q28:

2026: 24 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Order the following steps to for creation of series from NumPy Arrays.

(A) >>> import numpy as np

(B) >>> array1 = np.array([1,2,3,4])

(C) >>> import pandas as pd

(D) >>> series3 = pd.Series(array1)

(E) >>> print(series3)

Answer options

Q29:

2026: 24 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Extracting a part of a series can be done through _____________ .

Answer options

Q30:

2026: 24 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) pip install pandas(I) one-dimensional array containing a sequence of values
(B) Numpy array(II) can have different data types
(C) Pandas DataFrame(III) requires homogeneous data
(D) Series(IV) install Pandas library
Answer options