Edzy
AI TutorResourcesToolsCompareBuy
SearchDownload AppLogin
Edzy

Edzy for Classes 6-12

Edzy is a personal AI tutor for CBSE and State Board students, with curriculum-aligned guidance, practice, revision, and study plans that adapt to each learner.

  • Email: always@edzy.ai
  • Phone: +91 96256 68472
  • WhatsApp: +91 96256 68472
  • Address: Sector 63, Gurgaon, Haryana

Follow Edzy

Browse by Class

  • CBSE Class 6
  • CBSE Class 7
  • CBSE Class 8
  • CBSE Class 9
  • CBSE Class 10
  • CBSE Class 11
  • CBSE Class 12
Explore the CBSE resource hub

Explore Edzy

  • Study Resources
  • Free Study Tools
  • Best Apps for Board Exams
  • Edzy vs ChatGPT
  • About Us
  • Why We Built Edzy
  • Blog
  • CBSE AI Tutor

Support & Legal

  • Help & FAQs
  • Accessibility
  • Privacy Policy
  • Terms & Conditions
  • Refund Policy
  • Cookie Policy
  • Site Directory

© 2026 Edzy. All rights reserved.

Curriculum-aligned learning paths for students in Classes 6-12.

CBSE
Class 12
Informatics Practices
Informatics Practices
Data Handling using Pandas - II

Question Bank

Practice Hub

Question Bank: Data Handling using Pandas - II

This chapter explores advanced data handling techniques using Pandas, focusing on data manipulation and analysis for informed decision making.

Structured practice
Question Practice

Practice chapter questions in a cleaner, exam-ready flow

Start with curated question sets, move into full module views when needed, and keep discovering related practice without losing your place in the chapter.

Question Bank - Data Handling using Pandas - II

View all (127)
Q1.

What is the primary purpose of the Pandas library in Python?

Single Answer MCQ
Q-00093998
View explanation
Q2.

Which of the following is a fundamental data structure in Pandas?

Single Answer MCQ
Q-00093999
View explanation
Q3.

What function would you use to read a CSV file into a Pandas DataFrame?

Single Answer MCQ
Q-00094000
View explanation
Q4.

Which Pandas function is used to sort a DataFrame?

Single Answer MCQ
Q-00094001
View explanation
Q5.

In Pandas, what does the 'groupby()' function primarily accomplish?

Single Answer MCQ
Q-00094002
View explanation
Q6.

What method would you use to fill missing values in a DataFrame?

Single Answer MCQ
Q-00094003
View explanation
Q7.

In Pandas, how can you change the index of a DataFrame?

Single Answer MCQ
Q-00094004
View explanation
Q8.

What is the purpose of descriptive statistics in data analysis?

Single Answer MCQ
Q-00094005
View explanation
Q9.

Which keyword is used in Pandas to import the library?

Single Answer MCQ
Q-00094006
View explanation
Q10.

What is a common way to export DataFrame data to a CSV file in Pandas?

Single Answer MCQ
Q-00094007
View explanation
Q11.

If you have a DataFrame with NaN values, which method would you use to remove those rows?

Single Answer MCQ
Q-00094008
View explanation
Q12.

Which of the following operations is NOT directly performed by Pandas?

Single Answer MCQ
Q-00094009
View explanation
Q13.

In Pandas, which method would you use to combine two DataFrames along a row axis?

Single Answer MCQ
Q-00094010
View explanation
Q14.

Which term describes the process of summarizing data points to get insights?

Single Answer MCQ
Q-00094011
View explanation
Q15.

What do we call the labels we use to identify rows in a DataFrame?

Single Answer MCQ
Q-00094012
View explanation
Q16.

When using the method groupby() in Pandas, which is NOT a typical aggregation function?

Single Answer MCQ
Q-00094013
View explanation
Q17.

Which of the following is a feature of Pandas that facilitates data analysis?

Single Answer MCQ
Q-00094014
View explanation
Q18.

What does the DataFrame.max() function do in Pandas?

Single Answer MCQ
Q-00094015
View explanation
Q19.

Which of the following is not a measure of central tendency?

Single Answer MCQ
Q-00094016
View explanation
Q20.

What method would you use to calculate the average (mean) of a numeric column in a DataFrame?

Single Answer MCQ
Q-00094017
View explanation
Q21.

If you wanted to find the most frequently occurring value in a DataFrame column, which function would you use?

Single Answer MCQ
Q-00094018
View explanation
Q22.

Which of the following would correctly calculate the range of a numeric column?

Single Answer MCQ
Q-00094019
View explanation
Q23.

Which Pandas function would you use to obtain the variance of a column?

Single Answer MCQ
Q-00094020
View explanation
Q24.

How does including the argument numeric_only=True in the max() method change its output?

Single Answer MCQ
Q-00094021
View explanation
Q25.

If the mode of a dataset is 5 and the values are given as [1, 2, 3, 4, 5, 5, 6], what is the significance of that mode?

Single Answer MCQ
Q-00094022
View explanation
Q26.

Which measure of central tendency divides a dataset into four equal parts?

Single Answer MCQ
Q-00094023
View explanation
Q27.

Which function would you use to summarize counts of unique values in a DataFrame column?

Single Answer MCQ
Q-00094024
View explanation
Q28.

What is the effect of handling missing values before statistical analysis?

Single Answer MCQ
Q-00094025
View explanation
Q29.

In a dataset with grades out of 100, which of the following statistics would give the most precise overview of student performance?

Single Answer MCQ
Q-00094026
View explanation
Q30.

What does the term 'Descriptive Statistics' refer to?

Single Answer MCQ
Q-00094027
View explanation
Q31.

When calculating the median, what step must be taken if the number of observations is even?

Single Answer MCQ
Q-00094028
View explanation
Q32.

Which operation is NOT typically part of descriptive statistics?

Single Answer MCQ
Q-00094029
View explanation
Q33.

What function is used to sort values in a Pandas DataFrame?

Single Answer MCQ
Q-00094030
View explanation
Q34.

By default, how does the sort_values() function order the DataFrame?

Single Answer MCQ
Q-00094031
View explanation
Q35.

Given the DataFrame df, which code will sort the DataFrame by the column 'Maths' in descending order?

Single Answer MCQ
Q-00094032
View explanation
Q36.

If two students have the same marks in 'Science', how can we sort them by 'Hindi' using sort_values()?

Single Answer MCQ
Q-00094033
View explanation
Q37.

When sorting a DataFrame by multiple columns, what happens if the first column has duplicate values?

Single Answer MCQ
Q-00094034
View explanation
Q38.

What is the default value of the 'axis' parameter in the sort_values() function?

Single Answer MCQ
Q-00094035
View explanation
Q39.

What will be the output of df.sort_values(by='UT', ascending=True) if 'UT' contains values from 1 to 3 in a DataFrame?

Single Answer MCQ
Q-00094036
View explanation
Q40.

Which of the following would correctly sort a DataFrame and ignore the original index?

Single Answer MCQ
Q-00094037
View explanation
Q41.

What happens if you attempt to sort a DataFrame by a column that doesn’t exist?

Single Answer MCQ
Q-00094038
View explanation
Q42.

To sort a DataFrame in descending order by multiple columns, which syntax is incorrect?

Single Answer MCQ
Q-00094039
View explanation
Q43.

Which Pandas function returns a new sorted DataFrame without modifying the original?

Single Answer MCQ
Q-00094040
View explanation
Q44.

When should the parameter 'ascending' be set to False in the sort_values() function?

Single Answer MCQ
Q-00094041
View explanation
Q45.

What is the output if the DataFrame df is sorted by 'Scores' in ascending order containing just one row?

Single Answer MCQ
Q-00094042
View explanation
Q46.

In the following statement, what does 'df.sort_values(by='Age', ascending=True)' do?

Single Answer MCQ
Q-00094043
View explanation
Q47.

Which function would you use to find the maximum value in a Pandas DataFrame column?

Single Answer MCQ
Q-00094044
View explanation
Q48.

What does the aggregate function in Pandas do?

Single Answer MCQ
Q-00094045
View explanation
Q49.

Which of the following functions returns the count of entries in a Pandas DataFrame column?

Single Answer MCQ
Q-00094046
View explanation
Q50.

What does the GROUP BY function in Pandas do?

Single Answer MCQ
Q-00094047
View explanation
Q51.

If you want to calculate the mean and the sum of marks for each student in a DataFrame, which method would you use?

Single Answer MCQ
Q-00094048
View explanation
Q52.

Which method would you use to obtain the size of each group in a DataFrame after a GROUP BY operation?

Single Answer MCQ
Q-00094049
View explanation
Q53.

In which scenario would you use axis=1 with the aggregate function in Pandas?

Single Answer MCQ
Q-00094050
View explanation
Q54.

What is the first step in the split-apply-combine strategy of GROUP BY in Pandas?

Single Answer MCQ
Q-00094051
View explanation
Q55.

What is the result of df[['Maths', 'Science']].aggregate('sum', axis=1) for the provided DataFrame?

Single Answer MCQ
Q-00094052
View explanation
Q56.

In Pandas, which method gets the data for a specific group after a GROUP BY operation?

Single Answer MCQ
Q-00094053
View explanation
Q57.

What will be the output of executing df['Maths'].aggregate(['max', 'min'])?

Single Answer MCQ
Q-00094054
View explanation
Q58.

Which of the following statements correctly demonstrates grouping by multiple columns in a DataFrame?

Single Answer MCQ
Q-00094055
View explanation
Q59.

Which aggregation function would you use to obtain the variance of a DataFrame column?

Single Answer MCQ
Q-00094056
View explanation
Q60.

If you want to calculate the sum of a column after grouping by another column, which statement is correct?

Single Answer MCQ
Q-00094057
View explanation
Q61.

What is the default behavior of the axis parameter in Pandas aggregation functions?

Single Answer MCQ
Q-00094058
View explanation
Q62.

Which of the following is a key benefit of using the GROUP BY function?

Single Answer MCQ
Q-00094059
View explanation
Q63.

In the context of Pandas, what does it mean to aggregate data?

Single Answer MCQ
Q-00094060
View explanation
Q64.

What does the method g1.first() return after a GROUP BY operation?

Single Answer MCQ
Q-00094061
View explanation
Q65.

If we have a DataFrame df with NaN values, what will df['Maths'].aggregate('mean') return?

Single Answer MCQ
Q-00094062
View explanation
Q66.

Which method would you use to visualize the distribution of data within each group?

Single Answer MCQ
Q-00094063
View explanation
Q67.

What is a potential issue when using aggregate functions without understanding your data?

Single Answer MCQ
Q-00094064
View explanation
Q68.

How can GROUP BY assist in analyzing student performance in different subjects?

Single Answer MCQ
Q-00094065
View explanation
Q69.

When using multiple aggregation functions simultaneously, what is essential in their application?

Single Answer MCQ
Q-00094066
View explanation
Q70.

What will happen if you try to group by a non-existent column?

Single Answer MCQ
Q-00094067
View explanation
Q71.

If df.aggregate(['mean', 'max'], axis=1) is executed, which output can you expect?

Single Answer MCQ
Q-00094068
View explanation
Q72.

When applying a function after group by, which type of function might be used?

Single Answer MCQ
Q-00094069
View explanation
Q73.

Which of the following represents the correct syntax to apply multiple aggregate functions across the DataFrame?

Single Answer MCQ
Q-00094070
View explanation
Q74.

Which of the following is NOT a method related to GROUP BY in Pandas?

Single Answer MCQ
Q-00094071
View explanation
Q75.

In a situation where you want to group by a column and apply a transformation without reducing the DataFrame's size, which method would you use?

Single Answer MCQ
Q-00094072
View explanation
Q76.

What is the default type of index created in a Pandas DataFrame?

Single Answer MCQ
Q-00094073
View explanation
Q77.

Which function is used to change the index of a DataFrame to a specific column?

Single Answer MCQ
Q-00094074
View explanation
Q78.

What happens to the current index when using reset_index() in a DataFrame?

Single Answer MCQ
Q-00094075
View explanation
Q79.

When altering the index of a DataFrame, what does the parameter 'drop' do in set_index()?

Single Answer MCQ
Q-00094076
View explanation
Q80.

Which of the following statements correctly alters the index of the DataFrame df to the 'Name' column?

Single Answer MCQ
Q-00094077
View explanation
Q81.

If a DataFrame with a non-continuous index is sliced, what type of index is produced from the slice?

Single Answer MCQ
Q-00094078
View explanation
Q82.

What is the output of df.reset_index(drop=True) if df has a non-numeric index?

Single Answer MCQ
Q-00094079
View explanation
Q83.

When is it useful to use the function set_index()?

Single Answer MCQ
Q-00094080
View explanation
Q84.

If a DataFrame has duplicate indices, how does it affect data operations?

Single Answer MCQ
Q-00094081
View explanation
Q85.

To alter an index without losing the original data structure, which of the following parameters might you use in set_index()?

Single Answer MCQ
Q-00094082
View explanation
Q86.

If a DataFrame df has a DateTime index, how can it be altered to a numeric index without dropping the existing information?

Single Answer MCQ
Q-00094083
View explanation
Q87.

Which function in Pandas is used to reshape data into a new DataFrame?

Single Answer MCQ
Q-00094084
View explanation
Q88.

When using the pivot_table() function, what parameter specifies how to aggregate the data?

Single Answer MCQ
Q-00094085
View explanation
Q89.

What will the pivot function return if the index and column parameters specify a non-unique entry?

Single Answer MCQ
Q-00094086
View explanation
Q90.

How can you handle multiple values in the pivot_table() aggregation without raising an error?

Single Answer MCQ
Q-00094087
View explanation
Q91.

Which of the following is NOT a valid option for the aggfunc parameter in pivot_table()?

Single Answer MCQ
Q-00094088
View explanation
Q92.

What type of index does the pivot() function create by default if not specified?

Single Answer MCQ
Q-00094089
View explanation
Q93.

Which of the following statements correctly describes the use of the pivot_table() function?

Single Answer MCQ
Q-00094090
View explanation
Q94.

In which scenario should you use pivot_table() instead of pivot()?

Single Answer MCQ
Q-00094091
View explanation
Q95.

How do you create a new DataFrame with only relevant columns using the pivot() function?

Single Answer MCQ
Q-00094092
View explanation
Q96.

What must be ensured when performing reshaping of data?

Single Answer MCQ
Q-00094093
View explanation
Q97.

Which of the following will correctly return a pivoted DataFrame without errors?

Single Answer MCQ
Q-00094094
View explanation
Q98.

What is the primary purpose of the melt() function in Pandas?

Single Answer MCQ
Q-00094095
View explanation
Q99.

If you wanted to pivot a DataFrame and keep track of total profits per store per year, which structure should you use?

Single Answer MCQ
Q-00094096
View explanation
Q100.

Which of the following functions is effective for handling missing data in a DataFrame?

Single Answer MCQ
Q-00094097
View explanation
Q101.

What command is used to install the pymysql library in Python?

Single Answer MCQ
Q-00094098
View explanation
Q102.

Which library is used to facilitate the connection between Pandas and MySQL?

Single Answer MCQ
Q-00094099
View explanation
Q103.

To read data from a MySQL database into a Pandas DataFrame, which method is commonly used?

Single Answer MCQ
Q-00094100
View explanation
Q104.

Which statement best describes exporting data from Pandas to MySQL?

Single Answer MCQ
Q-00094101
View explanation
Q105.

What does the to_sql() function accomplish in Pandas?

Single Answer MCQ
Q-00094102
View explanation
Q106.

What is required before importing or exporting data between Pandas and MySQL?

Single Answer MCQ
Q-00094103
View explanation
Q107.

Which function can be used to connect to a MySQL database from a Python script?

Single Answer MCQ
Q-00094104
View explanation
Q108.

When importing data into a DataFrame from MySQL, which SQL command is often used?

Single Answer MCQ
Q-00094105
View explanation
Q109.

If you need to handle missing values in your DataFrame before exporting to MySQL, what could be a useful approach?

Single Answer MCQ
Q-00094106
View explanation
Q110.

Which of the following is true when you export a DataFrame to MySQL?

Single Answer MCQ
Q-00094107
View explanation
Q111.

What does establishing a connection to MySQL using pymysql require?

Single Answer MCQ
Q-00094108
View explanation
Q112.

Which step is necessary after importing data into a DataFrame before any analysis?

Single Answer MCQ
Q-00094109
View explanation
Q113.

Using to_sql() in Pandas to export a DataFrame requires which of the following?

Single Answer MCQ
Q-00094110
View explanation
Q114.

What does NaN stand for in a Pandas DataFrame?

Single Answer MCQ
Q-00094111
View explanation
Q115.

Which function can be used to remove rows with missing values in a DataFrame?

Single Answer MCQ
Q-00094112
View explanation
Q116.

What parameter can be passed to the fillna function to fill missing values with the previous value?

Single Answer MCQ
Q-00094113
View explanation
Q117.

What is one common reason for having missing values in a dataset?

Single Answer MCQ
Q-00094114
View explanation
Q118.

When using fillna(method='bfill'), which value is used to fill NaN?

Single Answer MCQ
Q-00094115
View explanation
Q119.

Which of the following statements about handling NaN values is FALSE?

Single Answer MCQ
Q-00094116
View explanation
Q120.

In a DataFrame, if a student did not appear for an exam, what could be done with that missing value to calculate average scores?

Single Answer MCQ
Q-00094117
View explanation
Q121.

What happens when both dropna() and fillna() are called on the same DataFrame at the same time?

Single Answer MCQ
Q-00094118
View explanation
Q122.

Which method would you use to replace missing values based on the average of an entire column?

Single Answer MCQ
Q-00094119
View explanation
Q123.

What would the statement df.isna().sum() return?

Single Answer MCQ
Q-00094120
View explanation
Q124.

When handling missing values, why might someone choose to fill them with a constant value such as zero?

Single Answer MCQ
Q-00094121
View explanation
Q125.

If missing values are handled poorly, what might be a consequence of this oversight?

Single Answer MCQ
Q-00094122
View explanation
Q126.

When should you use dropna instead of fillna?

Single Answer MCQ
Q-00094123
View explanation
Q127.

What is the recommended first step in handling missing values?

Single Answer MCQ
Q-00094124
View explanation
Learn Better On The App
Competitive revision

Challenge Your Friends

Compete in short duels with fast rounds, instant feedback, and zero boredom.

1v1 challenges
Fast recall training

Faster access to practice, revision, and daily study flow.

Edzy mobile app preview