CARVIEW |
Checking & Handling Null Values and Duplicates
Checking & Handling Null Values and Duplicates Quiz
Question 1
Which function is used to check for missing values in a Pandas DataFrame?
isna()
fillna()
replace()
dropna()
Question 2
What does notnull()
return when applied to a DataFrame?
A DataFrame of
False
values for missing dataA DataFrame of
True
values for missing dataA DataFrame of
True
values for non-missing dataA list of missing values
Question 3
Which method is used to replace all missing values in a DataFrame with a specific value?
dropna()
replace()
fillna()
interpolate()
Question 4
What happens when you use dropna(how='all')
on a DataFrame?
Drops rows with at least one missing value
Drops columns with at least one missing value
Drops rows where all values are missing
Drops the entire DataFrame
Question 5
Which method can fill missing values using previous row values?
bfill
pad
replace
dropna
Question 6
How does interpolate(method='linear')
handle missing values?
It deletes rows with missing values
It replaces missing values with a fixed number
It fills missing values by estimating them based on existing data
It replaces missing values with the column mean
Question 7
Why is it important to remove duplicate data from a dataset?
To add more records
To increase data size
To ensure accurate analysis and reduce errors
To make data entry easier
Question 8
What does the duplicated()
method return?
Only duplicate values
A list of column names
The last occurrence of each row
A Boolean Series showing duplicate rows
Question 9
Which method is used to remove duplicate rows from a DataFrame?
remove_duplicates()
drop_duplicates()
delete_duplicates()
clear_duplicates()
Question 10
What does keep='last'
do in the drop_duplicates()
method?
Keeps only the first duplicate
Deletes all duplicates
Keeps both first and last
Keeps the last occurrence of the duplicate rows
There are 10 questions to complete.