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

Q1:

2026: 18 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Indexes or labels of a row or column can be changed in a DataFrame using ____________________.

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

Q2:

2026: 18 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

Which pandas function replaces the missing value by the value placed before the missing value?

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

Q3:

2026: 18 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

__________ and _________ are the two functions used for changing the structure of a dataframe.

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

Q4:

2026: 18 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

NameTestCourseMarks
Ajay1Commerce50
Alok1Information practices40
Arun1Physics60

Consider the above given dataframe as 'df'.

With reference to the pandas function sort_values(), which parameter is used to specify the column name?

Answer options
Option 2
Correct Answer
Explanation for 2026: 18 May Shift 2 CSE question 4

Q5:

2026: 18 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

Arrange the following operations for importing and exporting the data between Pandas and MYSQL applications.

A. install pymysql

B. Establish the connection

C. install sqlalchemy

D. Fetch the data

Answer options
Option 2
Correct Answer
Explanation for 2026: 18 May Shift 2 CSE question 5

Q6:

2026: 13 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Which of the following library is used to interact with the MySQL database by providing the required credentials?

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

Q7:

2026: 13 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Arrange the following steps to use the GROUP BY() function in Pandas:

(A) Apply the required function.

(B) Import pandas.

(C) Split the data into groups by creating a GROUP BY object from the original DataFrame.

(D) Combine the results to form a new DataFrame.

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

Q8:

2026: 13 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Arrange the following steps to import Data from MySQL to Pandas DataFrame 'df':

(A) engine=create_engine('mysql+pymysql:// root:smsmb@localhost:3306/CARSHOWROOM')

(B) import pandas as pd; import pymysql as py; import sqlalchemy

(C) df = pd.read_sql_query('SELECT * FROM INVENTORY', engine)

(D) print(df)

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

Q9:

2026: 13 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Which function is used to calcuate quartile in pandas DataFrame 'df'?

Answer options
Option 4
Correct Answer
Explanation for 2026: 13 May Shift 2 CSE question 9

Q10:

2026: 13 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Which function is used for dropping the entire row (object) having the missing values?

Answer options

Q11:

2026: 13 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Which of the following descriptive statistical methods can be applied to a DataFrame?

(A) Max

(B) Min

(C) Mean

(D) Search

Answer options

Q12:

2026: 11 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Consider the following DataFrame 'dfSubject'.

MathsScienceS.StHindiEng
02221182021
12120172224
21419152423
32017222419
42315212515
52218192313
62319201522
72422241721
81225192123
91522252222
101821252423
111718202520

Select the correct command to find First and Third quartiles of all the subjects.

Answer options

Q13:

2026: 11 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

Arrange the following steps of reading Data from MySQL to Pandas in correct order.

A. import sqlalchemy

B. df = pd.read_sql_query('SELECT * FROM INVENTORY', engine)

C. pip install pymysql

D. pip install sqlalchemy

E. engine=create_engine('mysql+pymysql://root:smsmb@localhost:3306/CARSHOWROOM')

Answer options

Q14:

2026: 11 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Which function will be used to create a new index alongside an already available index?

Answer options

Q15:

2026: 11 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Which of the following are steps corresponding to the GROUP BY function strategy?

A. apply

B. split

C. combine

D. dataframe

Answer options

Q16:

2026: 11 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

You want to generate a report showing the top customers based on the amount they spent in your store. Which sequence should you follow while writing the query?

A. groupby

B. aggregate for sum total

C. sort_values

D. picking the required head rows

Answer options

Q17:

2025: 3 June Shift 2

Pandas Data Analysis

Hard

Informatics Practices

What will be the variance of the following data -

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

Answer options

Q18:

2025: 3 June Shift 2

Pandas Data Analysis

Medium

Informatics Practices

Which function do we use to fill the missing values with previous entry?

Answer options

Q19:

2025: 3 June Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Arrange the following steps to use group by function on a DataFrame .

(A) split into groups

(B) apply the required function

(C) combine the results

(D) print the results

Answer options

Q20:

2025: 3 June Shift 2

Pandas Data Analysis

Easy

Informatics Practices

What does .dropna(how='all') do?

Answer options

Q21:

2025: 3 June Shift 2

Pandas Data Analysis

Medium

Informatics Practices

Match List-I with List-II

List-IList-II
(A) pivot()(I) reshape data based on column values
(B) melt()(II) convert the wide format data to a long format
(C) set_index()(III) assign column as index
(D) reset_index()(IV) convert index back to column
Answer options

Q22:

2025: 3 June Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Arrange the following steps to export DataFrame into MYSQL database.

(A) import pandas and pymysql

(B) Commit changes and close database

(C) Use to_sql() method with appropriate table name and connection

(D) Establish connection to database

Answer options

Q23:

2025: 30 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) To display the variance of a DataFrame.(I) DateFrame.mode()
(B) To display the value that appears the most number of times in a data.(II) DataFrame.var()
(C) To display the middle value of of each column of a DataFrame.(III) DataFrame.mean()
(D) To display the average of the values of each column of a DataFrame.(IV) DataFrame.Median()
Answer options

Q24:

2025: 30 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Which of the following function will display the descriptive statistical values in a single command?

Answer options

Q25:

2025: 30 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

Match List-I with List-II

List-IList-II
(A) df.fillna(method='pad')(I) Will remove the entire row (object) having the missing value(s) from the DataFrame.
(B) df.fillna(method='bfill')(II) Makes changes in the original DataFrame.
(C) inplace=true(III) Replaces the missing value by the value after the missing value.
(D) dropna()(IV) Replaces the missing value by the value before the missing value.
Answer options

Q26:

2025: 30 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

The mandatory libraries for facilitating import and export of data between Pandas and MySQL are:

(A) pymysql

(B) CSV

(C) DataFrame

(D) sqlalchemy

Answer options

Q27:

2025: 30 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

Consider the following DataFrame: 'stationary':

ITNOTYPEPRICEQTY
101PENS200400
109PENCILS100600
120ERASERS300300
111SHARPENERS700100
124PENS10250

State the output of the following command:

stationary[stationary.TYPE=='PENS']['PRICE'].min(numeric_only=True)

Answer options

Q28:

2025: 30 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

Consider the following DataFrame: 'Product'

ITNOBRANDPRICEITEM
101WHIRLPOOL20000WASHING MACHINE
109LG1000TELEVISION
120H&M3000BLAZER
111LG7000TELEVISION

Write the python code to display the maximum price of LG TV.

Answer options

Q29:

2025: 27 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Arrange the following in correct order with respect to GROUP BY function:

(A) Split the data into groups by using GROUP BY object from the original DataFrame.

(B) Import necessary libraries.

(C) Combine the results to form a new DataFrame.

(D) Apply the required functions.

Answer options

Q30:

2025: 27 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

If you want to find the median age of the employees in a DataFrame 'df_emp', then which pandas method will be used?

Answer options