Tidy Data
noun
say it: “TY-dee DAY-tuh” /ˈtaɪdi ˈdeɪtə/
A table laid out so each row is one observation, each column is one kind of value, and each cell holds a single value.
What is tidy data?
Tidy data is the textbook name for a table where each row is one observation, each column is one kind of value, and each cell holds one value. It's long format: the shape pandas filters, groups and charts most easily.
import pandas as pd
tidy = pd.DataFrame({"student_id": [101, 101, 102],
"quiz": ["quiz1", "quiz2", "quiz1"],
"score": [88, 90, 92]}) # one row for each score
In a sentence
- “A cell reading 88, 90 breaks the rules of tidy data.”
- “After melt(), the scores were tidy data: one row per student per quiz.”
Level: Journeyman · More Python terms at this level
Updated