True or false: An unusual value should be changed automatically during cleaning, even when it may be correct.
4 Data Cleaning and Preparation Online Quiz Questions
Use this free practice quiz with 20 questions to review 4 Data Cleaning and Preparation, test your knowledge, and prepare for your next test or exam.
A dataset uses blank cells, N/A, and unknown to indicate unavailable values. What should you do before counting missing values?
- A
Treat zero, an empty string, and “none” as missing in every column.
- B
Identify and standardize missing-value markers, while distinguishing them from zero and other actual values.
- C
Count only blank cells as missing, because other markers are valid values.
- D
Replace every missing value with zero before counting.
A numeric column is skewed, and you decide to impute its missing values with a typical value. Which statistic does the material suggest considering?
Before removing suspected duplicate sales records, define what makes a record unique. A can identify an individual transaction.
A column contains the date 03/04/2025, but the source's date convention is unknown. What is the safest next step before parsing it?
- A
Parse it as March 4 because month-first order is universal.
- B
Parse it as April 3 because day-first order is universal.
- C
Confirm whether the source uses month-first or day-first order before parsing.
- D
Replace it with a missing value because it is not already in ISO format.
A team is writing explicit validation rules for a dataset. Select all checks that are supported validation rules.
- A
Check that dates parse as dates and quantities are numeric.
- B
Check that required identifiers are present.
- C
Check that a status belongs to its defined set of allowed values.
- D
Check that a delivery date does not precede its order date.
- E
Check that fields defined as unique contain no duplicates.
- F
Treat every negative amount as invalid without investigating its meaning.
- G
Require every column to have a value in every row.
True or false: In the Python example, unparseable date values become missing values so they can be reviewed.
- A
True
- B
False
To avoid leaking information into machine-learning evaluation, fit imputation values on the only, then apply the fitted transformation to test data.
A team wants to prepare data for machine learning without leaking information into evaluation. Select all the actions that follow the recommended approach.
- A
Split the data into training and test sets before learning imputation values.
- B
Fit the imputation transformation using training data only.
- C
Apply the fitted training transformation to the test data.
- D
Calculate an imputation value using the full dataset before splitting.
- E
Fit a separate imputation transformation on the test set.
When handling missing values in an important field, what feature could you retain to record which entries were originally missing?
A dataset combines measurements from sources that may use centimeters or inches. What should you do before converting values to a common unit?
- A
Convert every value using the same numerical multiplier regardless of its original unit.
- B
Verify the original and target units before converting.
- C
Treat unit labels as cosmetic and remove them before analysis.
- D
Convert every measurement to inches because all datasets use that standard.
A status field is defined to allow only open, closed, or pending, but a row contains in progress. What is the appropriate response?
- A
Automatically replace
in progresswithopenbecause it sounds similar. - B
Delete the row because any unlisted status proves the record is false.
- C
Flag the value for investigation against the defined set of allowed statuses.
- D
Expand the allowed set to include every value found, without review.
True or false: A reliable cleaning workflow rechecks validation rules and compares summaries before and after transformations.
- A
True
- B
False
A validation check flags a negative sales amount. Describe how you would investigate and decide whether to change or retain the record, and explain how you would document your decision.
Before cleaning a newly imported dataset, what is the most reliable first step?
- A
Replace unusual values directly in the only copy of the data.
- B
Preserve the original data and make justified changes to a working copy.
- C
Delete every row containing an unexpected value.
- D
Standardize all values before checking what the columns mean.
A dataset uses blank cells, N/A, and unknown to represent unavailable values. What should you do before counting missing values?
- A
Treat zero, an empty string, and “none” as missing in every column.
- B
Count only blank cells as missing and leave other markers unchanged.
- C
Identify and standardize the column’s missing-value markers before counting missing values.
- D
Replace every missing value with zero before checking how many there are.
A measurement column may contain values recorded in both centimeters and inches. What should you do before converting the values to one unit?
- A
Convert every measurement to the unit used most often in the dataset without checking its source.
- B
Confirm the source units and the intended meaning before converting measurements.
- C
Treat values in different units as equivalent if their column names match.
- D
Remove measurements whenever the source unit is not already standardized.
Two sales have the same date and amount, but may be separate events. How should you decide whether either row is a duplicate?
- A
Delete one record whenever two rows have the same date.
- B
Treat matching dates and amounts as proof that the records are duplicates.
- C
Keep all repeated rows without checking what makes a record unique.
- D
Define a meaningful record key, then inspect suspected duplicates before removing any.
In the pandas example, what value is assigned to the errors argument so that unparseable dates become missing values for review?
What validation rule category checks that a delivery date does not precede its order date?