Why does knowing the unit of observation and each column's data type matter early in EDA?
Quick Overview
Asks why the unit of observation and each column's measurement level should be settled at the start of exploratory data analysis. Tests understanding of data grain, the nominal, ordinal, interval and ratio levels, and the counting, aggregation and encoding mistakes they prevent.
Why does knowing the unit of observation and each column's data type matter early in EDA?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Early in exploratory data analysis (EDA), why do you need to understand the unit of observation (what one row represents) and the data type of each column (nominal, ordinal, interval, ratio, categorical, numerical, datetime)? What goes wrong when you skip this step?
```hint Start with a row count
Ask what a count of rows means in the table, and what happens to an average when the same entity appears in many rows.
```
### What a Strong Answer Covers
- What the unit of observation is and how to confirm it from the data
- How the grain affects counts, joins, aggregates and the train/test split
- Which operations and summaries each measurement level allows
- Columns whose stored type misleads, such as IDs, codes and dates stored as text
- The checks and conversions to make in the first pass
### Follow-up Questions
- A table has one row per customer per month. How does that change how you compute a churn rate and how you split train and test data?
- How would you encode a 1 to 5 rating for a linear model, and would the answer change for a tree model?
- Why is the coefficient of variation meaningless for temperatures in Celsius?
- How would you average the hour of day for events that cluster around midnight?
Overview: Asks why the unit of observation and each column's measurement level should be settled at the start of exploratory data analysis. Tests understanding of data grain, the nominal, ordinal, interval and ratio levels, and the counting, aggregation and encoding mistakes they prevent.
Early in exploratory data analysis (EDA), why do you need to understand the unit of observation (what one row represents) and the data type of each column (nominal, ordinal, interval, ratio, categorical, numerical, datetime)? What goes wrong when you skip this step?
What a Strong Answer Covers Guidance
What the unit of observation is and how to confirm it from the data
How the grain affects counts, joins, aggregates and the train/test split
Which operations and summaries each measurement level allows
Columns whose stored type misleads, such as IDs, codes and dates stored as text
The checks and conversions to make in the first pass
Follow-up Questions Guidance
A table has one row per customer per month. How does that change how you compute a churn rate and how you split train and test data?
How would you encode a 1 to 5 rating for a linear model, and would the answer change for a tree model?
Why is the coefficient of variation meaningless for temperatures in Celsius?
How would you average the hour of day for events that cluster around midnight?