CUET Computer/IP: Informatics PracticesPandas Data Analysis. Free, no login required.

Q1:

2026: 31 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Calculate the median for the following values.

21, 14, 20, 23, 22, 23, 24, 12, 15, 18, 17

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

Q2:

2026: 31 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

____ means transform a dataset and produce a single numerical value from an array.

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

Q3:

2026: 31 May Shift 1

Pandas Data Analysis

Hard

Informatics Practices

Consider the following DataFrame 'df':

ItemColorPrice(Rs)Units_in_stock
0PenRed1050
1PenRed2510
2PencilBlack747
3PencilBlack534
4PenBlue5055
5PenBlue2014

pivot3=df.pivot(index='Item', columns='Color ', values='Units_in_stock')

What will be the output of the above statement?

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

Q4:

2026: 31 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

The following function fills the missing values with next entry:

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

Q5:

2026: 31 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Arrange the following steps to perform a multi-column sort in pandas:

A. import pandas as pd

B. use .sort_values() with multiple columns and ascending parameter

C. load data into DataFrame

D. display the sorted DataFrame

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

Q6:

2026: 31 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

The function used for reshaping the data is____.

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

Q7:

2026: 29 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

To find the number of missing values in the whole DataFrame 'df', which of the following statements is correct?

A. df.isna().sum().sum()

B. df.isnull.sum()

C. df.isnull.sum().sum()

D. df.isna.sum()

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

Q8:

2026: 29 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

Match the LIST-I with LIST-II

LIST-ILIST-II
A.sqlalchemyI.function to save a DataFrame to a text or csv file
B.pymysqlII.contains connection string
C.create_engine()III.to install the database driver
D.to_csv( )IV.provides a function create_engine() that enables the connection to be established
Answer options
Option 2
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 8

Q9:

2026: 29 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

The default aggregate function in the context of "pivot tables" is ______________.

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

Q10:

2026: 29 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

A DataFrame 'df' has columns 'Mobile_brands' and 'unit_sold'. How will you calculate the total 'unit_sold' for each 'Mobile_brand' using groupby function?

Answer options

Q11:

2026: 29 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

There is a DataFrame 'df' with column 'Gender' and 'Salary'. How to calculate the average of the 'Salary' for each 'Gender' using pivot function?

Answer options

Q12:

2026: 29 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Which of the following functions does Pandas provide to reshape the DataFrame?

Answer options

Q13:

2026: 29 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Which of the following functions does not come under the category of statistical functions in Pandas?

Answer options

Q14:

2026: 29 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Data can be loaded in a DataFrame from a CSV file on the disk by using Pandas _______function.

Answer options

Q15:

2026: 29 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

df.fillna(method='pad') replaces the missing value by the value _____the missing value.

Answer options

Q16:

2026: 29 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Which statistical function of pandas is used to display the average of squared differences from the mean?

Answer options

Q17:

2026: 29 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

DataFrame.max() is used to calculate the maximum values from the DataFrame, regardless of its data types. If we want to output maximum value for the columns having only numeric values, then we can set the parameter numeric_only as ___ in the max() method.

Answer options

Q18:

2026: 29 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Which of the following Pandas function checks whether any value is missing or not in the DataFrame?

Answer options

Q19:

2026: 26 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

Consider the following DataFrame 'df' where the sales made by the companies in 3 quarters, is given:

NameQuarterSedanHatchbackCoupeSUV
Ford150604080
Ford240506070
Ford345573364
Mahindra160705049
Mahindra240503060
Mahindra355604576
Honda148543966
Honda241583263
Honda359674279

Find the average sale made by each company in each quarter.

Answer options

Q20:

2026: 26 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

NameMathsPhysicsChemistryEnglish
Manish40508070
Zainab607050
Richa456575
Rohit90787269
Suman637864
Atul748274
Charu668875

In the DataFrame 'df' given above, which of the following statement will find the total number of NaN in the whole dataset?

Answer options

Q21:

2026: 26 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Arrange the following functions of GROUP BY according to its working strategy:

(A) Combine the results

(B) Split the data

(C) Create the input DataFrame

(D) Apply the function

Answer options

Q22:

2026: 26 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

Which of the following command is NOT valid to fetch data from the table of the database?

Answer options

Q23:

2026: 26 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

StoreYearTotal_SalesTotal_profit
0S1201615000015000
1S4201640000040000
2S3201645000045000
3S1201735000035000
4S2201612000012000
5S4201745000045000
6S3201750000050000

In the DataFrame 'df' given above, there is a need for maximum sale for store 'S1' in any year. Which query will be appropriate for the problem?

(A) max_sales = df[df.Store == 'S1']

max_sales['Total_Sales'].max()

(B) max_sales = df[df['Store'] == 'S1']

max_sales['Total_Sales'].max()

(C) max_sales = df[df.Store == 'S1']

max_sales.df['Total_Sales'].max()

(D) max_sales = df[df['Store'] == 'S1']

max_sales.df['Total_Sales'].max()

Answer options

Q24:

2026: 24 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

What will be the output of df.isnull().any()?

Answer options

Q25:

2026: 24 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

Which of the following functions are used to split the data into groups based on some criteria?

Answer options

Q26:

2026: 24 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Arrange the following steps to calculate the total number of values for each row of a DataFrame.

(A) Load the DataFrame as 'df'

(B) Use the df.count() method

(C) Print the result

(D) import pandas as pd

Answer options

Q27:

2026: 24 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

What will be the output of the command df.count(axis = 1)?

Answer options

Q28:

2026: 24 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

What does pivot_table( ) do in pandas that pivot( ) cannot?

Answer options

Q29:

2026: 24 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

_________ will display the total number of values for each column or row of a DataFrame.

Answer options

Q30:

2026: 23 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Arrange the steps to split the data in to groups using the GROUP BY() based on some criteria:

A. Apply the required function.

B. Print the new DataFrame.

C. Combine the results to form a new DataFrame.

D. Split the data into groups by creating a GROUP BY object from the original DataFrame.

Answer options