How does a comma-separated values (CSV) file represent tabular data?
5. Cleaning and Preparing Datasets Online Quiz Questions
Use this free practice quiz with 20 questions to review 5. Cleaning and Preparing Datasets, test your knowledge, and prepare for your next test or exam.
What is the most appropriate first step in a reliable dataset-cleaning workflow?
- A
Delete the source file after importing it
- B
Replace all missing values immediately
- C
Keep an unchanged copy of the source file
- D
Remove unusual values before profiling
True or false: Converting every text value to lowercase is always an appropriate standardization step.
- A
True
- B
False
What is the standard term for documentation that defines a dataset's field meanings, expected types, units, permitted values, and relationships?
In the dataset type system, a score such as 82 should have the type, while a field containing only true or false should have the type.
Which checks are valid examples of data-validation rules? Select all that apply.
- A
Completeness checks for required fields
- B
Uniqueness checks for fields that should be unique
- C
A requirement that every value have the same visual color
- D
Relationship checks between related fields
A dataset has missing income values, and income differs substantially between relevant groups. If the original values cannot be recovered, which action is most defensible?
- A
Replace every missing income with zero
- B
Use a justified median from a relevant group and document that it is an estimate
- C
Delete all records containing a missing income without assessing the effect
- D
Treat a blank cell as proof that the income was zero
True or false: Every repeated identifier in a dataset proves that one of the corresponding records should be deleted.
- A
True
- B
False
What database term describes an identifier that has a unique value for each valid record?
A validation test that checks whether a return date comes after a purchase date is a check.
Which practices support ethical dataset preparation? Select all that apply.
- A
Retain only data necessary for the stated purpose
- B
Keep all direct identifiers permanently, regardless of need
- C
Assess whether a cleaning rule disproportionately removes a group
- D
Document transformations, assumptions, exclusions, and remaining limitations
In the worked school-data example, what preparation rule would make the attendance values consistently represented?
- A
Convert every attendance value to a letter grade
- B
Leave the percentage and decimal formats mixed
- C
Standardize attendance to a proportion between 0 and 1
- D
Replace all attendance values with the overall mean
Design a reproducible plan for preparing a dataset for analysis. Explain how you would preserve and understand the original data, handle missing and inconsistent values, investigate duplicates and outliers, validate the result, document changes, and assess ethical consequences.
In a tabular dataset, what is a field?
- A
A complete case or observation in the dataset
- B
One characteristic such as score or program
- C
A rule used to validate a value
- D
A unique identifier used as a primary key
A team is beginning to clean a dataset and wants its work to remain auditable. Which action best follows the recommended workflow?
- A
Delete the original after creating a cleaned file
- B
Keep an unchanged copy of the source file
- C
Replace all unusual values with the median
- D
Remove every record containing a blank
A measurement is missing, and the original record cannot be recovered. Which response is most appropriate when any plausible replacement would be highly speculative?
- A
Replace it with zero because the field has no recorded value
- B
Replace it with the overall average in every case
- C
Leave it missing when guessing would introduce more error
- D
Delete the entire dataset so that no missing values remain
A dataset contains two rows with the same customer identifier, but the unit of observation is a purchase. What should the analyst do before removing either row?
- A
Remove every row sharing an identifier immediately
- B
Merge all rows from the same customer into one record
- C
Investigate the records and decide using the dataset's unit and rules
- D
Keep all repeated rows without checking their contents
True or false: If direct identifiers have been removed, a dataset can no longer create a privacy risk.
- A
True
- B
False
In the worked school dataset, attendance is recorded as 95%. If attendance must be standardized to a proportion between 0 and 1, what numeric value should be entered?
What term names the documentation that records a dataset's field meanings, expected types, units, permitted values, and relationships?