Q1:
2025: 16 May Shift 1
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Which of the following is used to install MYSQL?
2025: 16 May Shift 1
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Which of the following is used to install MYSQL?
2025: 16 May Shift 1
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
_____________ function is used to reshape and create a new DataFrame from the original one.
2025: 15 May Shift 2
Informatics Practices
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( )
2025: 15 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Match List-I with List-II
| List-I | List-II |
|---|---|
| (A) mode( ) | (I) set_index |
| (B) altering index | (II) library |
| (C) reshaping DataFrame | (III) statistical function |
| (D) pymysql | (IV) pivoting |
2025: 15 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Standard Deviation is the:
2025: 15 May Shift 2
Informatics Practices
Pandas Data Analysis
Medium
Informatics Practices
___________ is the default value that indicates a ValueError if the table already exists in the database.
2025: 15 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Find the correct statement to check whether the dataframe (df) has missing values or not.
2025: 15 May Shift 2
Informatics Practices
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 ______.
2025: 14 May Shift 1
Informatics Practices
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)
2025: 14 May Shift 1
Informatics Practices
Pandas Data Analysis
Medium
Informatics Practices
To find the total number of NaN in the whole dataset, one can use _____________.
2025: 14 May Shift 1
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
sqlalchemy library is used __________.
2025: 14 May Shift 1
Informatics Practices
Pandas Data Analysis
Medium
Informatics Practices
Match List-I with List-II
| List-I | List-II |
|---|---|
| Function / Library | Usage |
| (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 |
2025: 14 May Shift 1
Informatics Practices
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)
2025: 14 May Shift 1
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
The isnull() function is used in pandas __________.
2025: 14 May Shift 1
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Which of the following is used to export a DataFrame to MYSQL?
Note: Here 'df' is a DataFrame.
2025: 13 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
The process of changing the structure of a DataFrame using function pivot() is known as ___________.
2025: 13 May Shift 2
Informatics Practices
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
2025: 13 May Shift 2
Informatics Practices
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()
2025: 13 May Shift 2
Informatics Practices
Pandas Data Analysis
Medium
Informatics Practices
Consider the given DataFrame 'df4'.
| NAME | PERIODIC | ENG | MATHS | SCIENCE | |
|---|---|---|---|---|---|
| 12 | MEENA | 1 | 40 | 60 | 80 |
| 17 | REENA | 2 | 60 | 30 | 10 |
| 18 | TEENA | 3 | 80 | 60 | 40 |
| 20 | SHEENA | 2 | 90 | 20 | 70 |
Select the correct command to get the following output:
| NAME | MEENAREENATEENASHEENA |
|---|---|
| PERIODIC | 8 |
| ENG | 270 |
| MATHS | 170 |
| SCIENCE | 200 |
2025: 13 May Shift 2
Informatics Practices
Pandas Data Analysis
Easy
Informatics Practices
Dataframe.quantile() is used to get the quartiles. The second quantile is known as _____________.