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

Q1:

2025: 16 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Which of the following is used to install MYSQL?

Answer options
Option 1
Correct Answer
Explanation for 2025: 16 May Shift 1 CSE question 1

Q2:

2025: 16 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

_____________ function is used to reshape and create a new DataFrame from the original one.

Answer options
Option 2
Correct Answer
Explanation for 2025: 16 May Shift 1 CSE question 2

Q3:

2025: 15 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

The process of changing the structure of the DataFrame is known as reshaping. Which functions allow to do reshaping?

(A) pivot( )

(B) DataFrame_pivot( )

(C) PIVOT( )

(D) pivot_table( )

Answer options
Option 1
Correct Answer
Explanation for 2025: 15 May Shift 2 CSE question 3

Q4:

2025: 15 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) mode( )(I) set_index
(B) altering index(II) library
(C) reshaping DataFrame(III) statistical function
(D) pymysql(IV) pivoting
Answer options
Option 3
Correct Answer
Explanation for 2025: 15 May Shift 2 CSE question 4

Q5:

2025: 15 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Standard Deviation is the:

Answer options
Option 3
Correct Answer
Explanation for 2025: 15 May Shift 2 CSE question 5

Q6:

2025: 15 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

___________ is the default value that indicates a ValueError if the table already exists in the database.

Answer options
Option 3
Correct Answer
Explanation for 2025: 15 May Shift 2 CSE question 6

Q7:

2025: 15 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Find the correct statement to check whether the dataframe (df) has missing values or not.

Answer options
Option 3
Correct Answer
Explanation for 2025: 15 May Shift 2 CSE question 7

Q8:

2025: 15 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

DataFrame.count() is used to display the total number of values or row of a DataFrame. To count rows we need to use argument ______.

Answer options
Option 3
Correct Answer
Explanation for 2025: 15 May Shift 2 CSE question 8

Q9:

2025: 14 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

Which of the following syntax are correct for data aggregation methods in pandas?

(A) df.aggregate('max')

(B) df.aggregate('sort')

(C) df['maths'].aggregate(['max', 'min'])

(D) df[['maths', 'science']].aggregate('sum', axis=1)

Answer options
Option 2
Correct Answer
Explanation for 2025: 14 May Shift 1 CSE question 9

Q10:

2025: 14 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

To find the total number of NaN in the whole dataset, one can use _____________.

Answer options

Q11:

2025: 14 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

sqlalchemy library is used __________.

Answer options

Q12:

2025: 14 May Shift 1

Pandas Data Analysis

Medium

Informatics Practices

Match List-I with List-II

List-IList-II
Function / LibraryUsage
(A) reset_index and set_index(I) changing the structure of the DataFrame
(B) pivot() and pivot_table()(II) labels of a row or column can be changed in a DataFrame
(C) pymysql and sqlalchemy(III) for facilitating the import and export of data
(D) describe()(IV) displays the statistical values in a single command
Answer options

Q13:

2025: 14 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Let 'CARS' is a DataFrame with the following fields- Id, Name, Price, Model, YearMaufacture, FuelType

Arrange the following code segment in correct order to read DataFrame 'df' from Database ('pd' is alias of pandas).

(A) import sqlalchemy

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

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

(D) print(df)

Answer options

Q14:

2025: 14 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

The isnull() function is used in pandas __________.

Answer options

Q15:

2025: 14 May Shift 1

Pandas Data Analysis

Easy

Informatics Practices

Which of the following is used to export a DataFrame to MYSQL?

Note: Here 'df' is a DataFrame.

Answer options

Q16:

2025: 13 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

The process of changing the structure of a DataFrame using function pivot() is known as ___________.

Answer options

Q17:

2025: 13 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

Put the following statistical measures in order starting from the one that provides the simplest measure of data to the most complex one that describes data spread.

(A) Mode

(B) Mean

(C) Median

(D) Range

(E) Standard Deviation

Answer options

Q18:

2025: 13 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

After establishing the connection to fetch the data from the table of a database in SQL into a DataFrame, which of the following function will be used?

(A) pandas.read_sql_query()

(B) pandas.read_sql_table()

(C) pandas.read_sql_query_table()

(D) pandas.read_sql()

Answer options

Q19:

2025: 13 May Shift 2

Pandas Data Analysis

Medium

Informatics Practices

Consider the given DataFrame 'df4'.

NAMEPERIODICENGMATHSSCIENCE
12MEENA1406080
17REENA2603010
18TEENA3806040
20SHEENA2902070

Select the correct command to get the following output:

NAMEMEENAREENATEENASHEENA
PERIODIC8
ENG270
MATHS170
SCIENCE200
Answer options

Q20:

2025: 13 May Shift 2

Pandas Data Analysis

Easy

Informatics Practices

Dataframe.quantile() is used to get the quartiles. The second quantile is known as _____________.

Answer options