Skip to main content
DATA-SCIENCE-FUNDAMENTALS5 MIN READ

Tidy the Grain Before You Analyze

Identify the observation unit in a dataset and reshape columns so variables, observations, and tables are separated cleanly.

Tidy structure protects analytical meaning. Variables as columns A variable is something you measure or classify: month, revenue, region, plan, churn_flag. When variables are buried in column names or notes, analysis code has to guess. Observations as rows An observation is the unit you are comparing. A row can be a customer, a customer-month, a ticket, or a transaction, but it should not change meaning halfway across the table. Units as tables Different observational units usually deserve different tables. Joining them back together should be deliberate, with keys and aggregation rules visible.

Read the full lesson

Sign up free — one personalized lesson every day, matched to your role and goals.

Already have an account? Sign in

← Back to library
Contact us