True or false: It is generally safe to replace every missing numeric value with zero because both indicate that no value is available.
3 Data Cleaning and Preparation Online Quiz Questions
Use this free practice quiz with 20 questions to review 3 Data Cleaning and Preparation, test your knowledge, and prepare for your next test or exam.
A blank in a dataset could mean “not collected,” “not applicable,” or “unknown.” What should you do before choosing how to handle it?
- A
Replace the blank with zero immediately
- B
Check the data source or codebook to determine what the blank means
- C
Delete the entire column without checking its importance
- D
Treat every blank as an estimate of the column median
Before cleaning a dataset, keep an of the data.
Which pandas method identifies missing values?
A dataset contains several rows with the same customer ID, but the rows have different event dates. What is the soundest first step before removing any of them?
- A
Delete all but one record with that customer ID
- B
Keep only the first row with the key, regardless of differences
- C
Check what one row represents and review key-based repeats before deciding what to do
- D
Treat every repeated key as a data-entry error
A plot flags several unusually high measurements. Which actions are consistent with careful outlier handling? Select all that apply.
- A
Check unusual values against domain rules, source records, and related fields
- B
Delete every value beyond a statistical cutoff
- C
Correct a value only when evidence supports the correction
- D
Retain or flag an unresolved value, or use a method suitable for extreme values
When a justified estimate is needed for a skewed numeric variable, the material gives the as an example of an imputation value.
True or false: If a category has a meaningful order, such as low, medium, and high, it should be sorted alphabetically when standardizing it.
- A
True
- B
False
A column includes dates written as 03/04/2025, but the dataset does not specify whether the month or day comes first. What should you do before converting the dates?
- A
Convert the date using whichever order is most common in your region
- B
Confirm the source’s date format before converting the value
- C
Replace the date with a missing value without checking
- D
Assume the first number must always be the month
Which pandas function is used to parse dates?
Which details should a cleaning log record so another person can understand and evaluate a consequential change? Select all that apply.
- A
The date of the cleaning decision
- B
The column or records affected
- C
The name of the person who first collected the data
- D
The issue found and action taken
- E
The reason for the action
- F
The number of values changed or removed
A region column contains West, west, and W.. How should you decide whether to standardize these as one category?
- A
Map every short label to the longest label automatically
- B
Convert every category to lowercase and assume that resolves all differences
- C
Confirm which values are equivalent using a reliable definition, then map only those
- D
Delete categories whose spelling differs
A numeric column has missing values, and the reason for their absence is not yet known. Describe a responsible process for deciding how to handle them, including what to investigate, how to choose a treatment, and what to document.
In pandas, what happens to an unparseable date when pd.to_datetime() is called with errors="coerce"?
- A
Unparseable entries are deleted from the DataFrame immediately
- B
Unparseable entries are replaced with the current date
- C
Unparseable entries become missing timestamps for review
- D
Every date is interpreted using a format inferred from the first row
A skewed numeric variable has missing entries, and the analysis requires a justified estimate for them. Which statistic is one suitable imputation choice?
A dataset contains blank cells, but the team does not know whether they mean “not collected,” “not applicable,” or “unknown.” What should the team do before choosing a treatment?
- A
Replace every blank with zero so all rows have numeric values.
- B
Check the data source or codebook to learn what the missing values mean.
- C
Delete every row that contains a blank, regardless of how much information it contains.
- D
Treat every blank as a failed measurement.
A table is intended to contain customer events, and several rows share a customer ID but differ in event details. What is the most appropriate next step before removing any rows?
- A
Delete all but the first row with that customer ID.
- B
Keep only rows that are exact matches across every column.
- C
Determine what one row represents and review the repeated records using a defined rule.
- D
Average every conflicting field and replace the original records.
A region column contains “North” and “N.” What should an analyst do before replacing “N.” with “North”?
- A
Confirm the values mean the same region using a reliable definition, then map only the confirmed equivalents.
- B
Map every short label to the nearest-looking full region name.
- C
Convert all category values to lowercase and treat the resulting strings as equivalent.
- D
Delete any category value that differs in capitalization or spacing.
Which pandas function can parse a date column when the intended date format is known?
True or false: A blank cell by itself establishes that a measurement failed.
- A
True
- B
False