We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Data Formats

Data providers pick the format that's convenient for them. As an analyst or engineer, you have the pain privilege of dealing with whatever shows up.

That usually means a small handful of formats over and over again. Some of the most common are:

  • JSON for nested API data
  • CSV for plain tabular data
  • Parquet for compressed analytics data

JSON

JSON is everywhere. It's the default format for many APIs because it's so easy to work with, and can represent nested data easily:

{
  "user": {
    "name": "Alice",
    "id": 123
  },
  "class": "CS 140"
}

CSV

CSV is more common for tabular data. It's a simple text format where each row is a record, and each column is a field:

user,score
Alice,150
Bob,200
Lane,90000
Miriah,90001

Parquet

Parquet is a binary columnar format used in many larger analytics systems. You wouldn't open it in a text editor like CSV, but it's great for massive datasets because it's:

  • binary (not human-readable)
  • commonly compressed
  • typed
  • columnar (data is stored by column instead of row, which can make analytics queries faster)