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

Q1:

2025: 15 May Shift 2

Series & DataFrames

Medium

Informatics Practices

DataFrame can be created from:

(A) series

(B) lists

(C) numpy

(D) dictionary

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

Q2:

2025: 15 May Shift 2

Series & DataFrames

Easy

Informatics Practices

To read the data from the CSV file in order to create DataFrame, ______ is the correct function. (Assume 'df' is the name of the DataFrame)

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

Q3:

2025: 15 May Shift 2

Series & DataFrames

Easy

Informatics Practices

Identify the correct function to change the name of row label in a DataFrame.

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

Q4:

2025: 15 May Shift 2

Series & DataFrames

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) DataFrame.values(I) To display row labels
(B) DataFrame.head( )(II) To display all the values of the DataFrame without axes labels
(C) DataFrame.size(III) To display the total values in a DataFrame
(D) DataFrame.index(IV) To display the top 5 rows
Answer options
Option 1
Correct Answer
Explanation for 2025: 15 May Shift 2 CSE question 4

Q5:

2025: 15 May Shift 2

Series & DataFrames

Easy

Informatics Practices

Arrange the following statements for creating a DataFrame:

(A) Create a DataFrame

(B) Display the DataFrame.

(C) Import the pandas library.

(D) Assign column headings.

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

Q6:

2025: 15 May Shift 2

Series & DataFrames

Easy

Informatics Practices

________ is the command to display the last 2 rows of a DataFrame.

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

Q7:

2025: 14 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Which of the following operations can be performed on a pandas series?

(A) Mathematical operations

(B) Indexing

(C) Adding a new column

(D) Slicing

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

Q8:

2025: 14 May Shift 1

Series & DataFrames

Easy

Informatics Practices

What will be the correct sequence of the following statements to create a series from a one-dimensional (1D) NumPy array?

(A) >>> import pandas as pd

(B) >>> s = pd.Series(a)

(C) >>> a = np.array([1,2,3,4])

(D) >>> import numpy as np

Answer options
Option 3
Correct Answer
Explanation for 2025: 14 May Shift 1 CSE question 8

Q9:

2025: 14 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Arrange the following steps for concatenating two DataFrames in Pandas in correct sequence:

(A) Import pandas library

(B) Define or create the DataFrame

(C) Pass the condition as an index to the DataFrame

(D) Store or display the results

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

Q10:

2025: 14 May Shift 1

Series & DataFrames

Easy

Informatics Practices

What does the pd.concat() operation in pandas do?

Answer options

Q11:

2025: 14 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Arrange the following statements in proper sequence:-

(A) series1 = pd.Series(array1)

(B) import pandas as pd

(C) array1 = np. array ([1, 2, 3, 4, 5])

(D) import numpy as np

Answer options

Q12:

2025: 14 May Shift 1

Series & DataFrames

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) Series(I) 1D labeled data structure
(B) DataFrame(II) 2D labeled data structure
(C) Dictionary(III) Key-value pair
(D) NumPy(IV) Homogeneous data structure
Answer options

Q13:

2025: 13 May Shift 2

Series & DataFrames

Easy

Informatics Practices

Sequence the steps to append data to an existing file and then read the entire file:

(A) Open the file in a+ mode.

(B) Use the read() method to output the contents.

(C) Use the write() or writelines() method to append data.

(D) Seek to the beginning of the file.

Answer options

Q14:

2025: 13 May Shift 2

Series & DataFrames

Medium

Informatics Practices

Which of the following are the correct commands to delete a column from the DataFrame 'df1'?

(A) df1=df1.drop(column name,axis=1)

(B) df1.drop(column name,axis=columns,inplace=True)

(C) df1.drop(column name,axis='columns',inplace=True)

(D) df1.drop(column name,axis=1,inplace=True)

Answer options

Q15:

2025: 13 May Shift 2

Series & DataFrames

Easy

Informatics Practices

Arrange the following in order in the context of exception handling:

(A) Program Termination

(B) Exception is raised

(C) Error occurs in a program

(D) Catching an exception

Answer options

Q16:

2025: 13 May Shift 2

Series & DataFrames

Easy

Informatics Practices

While transferring the data from a DataFrame to CSV file, if we do not want the column names to be saved to the file on the disk, the parameter to be used in to_csv() is_________.

Answer options

Q17:

2025: 13 May Shift 2

Series & DataFrames

Easy

Informatics Practices

Arrange the following statements to create a series from a dictionary.

(A) Print the series

(B) Import the pandas library

(C) Create the series

(D) Create a dictionary

Answer options

Q18:

2025: 13 May Shift 2

Series & DataFrames

Medium

Informatics Practices

Given the following DataFrame 'df':

PNONAME
111ROHAN
222MEETA
333SEEMA
444SHALU
555POONAM

Select the correct commands from the following to display the last five rows:

(A) print(df.tail(-5))

(B) print(df.head(-5))

(C) print(df.tail())

(D) print(df.tail(5))

Answer options

Q19:

2025: 13 May Shift 2

Series & DataFrames

Easy

Informatics Practices

Sequence the given process for checking whether a string is a palindrome or not, using a deque:

(A) Load the string into the deque.

(B) Continuously remove characters from both ends.

(C) Compare the characters.

(D) Determine if the string is a palindrome based on the comparisons.

Answer options

Q20:

2025: 13 May Shift 2

Series & DataFrames

Easy

Informatics Practices

Which of the following is the correct command to display the top 2 records of Series 'Tail'?

Answer options

Q21:

2025: 13 May Shift 2

Series & DataFrames

Easy

Informatics Practices

Given the following series 'ser1':

069
180
220
350
4100
570

State the output of the following command:

print(ser1>=70)

Answer options