Q1:
2026: 18 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Indexes or labels of a row or column can be changed in a DataFrame using ____________________.
2026: 18 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Indexes or labels of a row or column can be changed in a DataFrame using ____________________.
2026: 18 May Shift 2
Informatics Practices
Pandas Data Analysis
Medium
Informatics Practices
Which pandas function replaces the missing value by the value placed before the missing value?
2026: 18 May Shift 2
Informatics Practices
Pandas Data Analysis
Medium
Informatics Practices
__________ and _________ are the two functions used for changing the structure of a dataframe.
2026: 18 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
| Name | Test | Course | Marks |
|---|---|---|---|
| Ajay | 1 | Commerce | 50 |
| Alok | 1 | Information practices | 40 |
| Arun | 1 | Physics | 60 |
Consider the above given dataframe as 'df'.
With reference to the pandas function sort_values(), which parameter is used to specify the column name?
2026: 18 May Shift 2
Informatics Practices
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
2026: 13 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Which of the following library is used to interact with the MySQL database by providing the required credentials?
2026: 13 May Shift 2
Informatics Practices
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.
2026: 13 May Shift 2
Informatics Practices
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)
2026: 13 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Which function is used to calcuate quartile in pandas DataFrame 'df'?
2026: 13 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Which function is used for dropping the entire row (object) having the missing values?
2026: 13 May Shift 2
Informatics Practices
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
2026: 11 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Consider the following DataFrame 'dfSubject'.
| Maths | Science | S.St | Hindi | Eng | |
|---|---|---|---|---|---|
| 0 | 22 | 21 | 18 | 20 | 21 |
| 1 | 21 | 20 | 17 | 22 | 24 |
| 2 | 14 | 19 | 15 | 24 | 23 |
| 3 | 20 | 17 | 22 | 24 | 19 |
| 4 | 23 | 15 | 21 | 25 | 15 |
| 5 | 22 | 18 | 19 | 23 | 13 |
| 6 | 23 | 19 | 20 | 15 | 22 |
| 7 | 24 | 22 | 24 | 17 | 21 |
| 8 | 12 | 25 | 19 | 21 | 23 |
| 9 | 15 | 22 | 25 | 22 | 22 |
| 10 | 18 | 21 | 25 | 24 | 23 |
| 11 | 17 | 18 | 20 | 25 | 20 |
Select the correct command to find First and Third quartiles of all the subjects.
2026: 11 May Shift 2
Informatics Practices
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')
2026: 11 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Which function will be used to create a new index alongside an already available index?
2026: 11 May Shift 2
Informatics Practices
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
2026: 11 May Shift 2
Informatics Practices
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
2025: 3 June Shift 2
Informatics Practices
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
2025: 3 June Shift 2
Informatics Practices
Pandas Data Analysis
Medium
Informatics Practices
Which function do we use to fill the missing values with previous entry?
2025: 3 June Shift 2
Informatics Practices
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
2025: 3 June Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
What does .dropna(how='all') do?
2025: 3 June Shift 2
Informatics Practices
Pandas Data Analysis
Medium
Informatics Practices
Match List-I with List-II
| List-I | List-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 |
2025: 3 June Shift 2
Informatics Practices
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
2025: 30 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Match List-I with List-II
| List-I | List-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() |
2025: 30 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Which of the following function will display the descriptive statistical values in a single command?
2025: 30 May Shift 2
Informatics Practices
Pandas Data Analysis
Medium
Informatics Practices
Match List-I with List-II
| List-I | List-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. |
2025: 30 May Shift 2
Informatics Practices
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
2025: 30 May Shift 2
Informatics Practices
Pandas Data Analysis
Medium
Informatics Practices
Consider the following DataFrame: 'stationary':
| ITNO | TYPE | PRICE | QTY |
|---|---|---|---|
| 101 | PENS | 200 | 400 |
| 109 | PENCILS | 100 | 600 |
| 120 | ERASERS | 300 | 300 |
| 111 | SHARPENERS | 700 | 100 |
| 124 | PENS | 10 | 250 |
State the output of the following command:
stationary[stationary.TYPE=='PENS']['PRICE'].min(numeric_only=True)
2025: 30 May Shift 2
Informatics Practices
Pandas Data Analysis
Medium
Informatics Practices
Consider the following DataFrame: 'Product'
| ITNO | BRAND | PRICE | ITEM |
|---|---|---|---|
| 101 | WHIRLPOOL | 20000 | WASHING MACHINE |
| 109 | LG | 1000 | TELEVISION |
| 120 | H&M | 3000 | BLAZER |
| 111 | LG | 7000 | TELEVISION |
Write the python code to display the maximum price of LG TV.
2025: 27 May Shift 2
Informatics Practices
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.
2025: 27 May Shift 2
Informatics Practices
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?