Module 1 · Start Here: Think Like a Data Scientist · Lesson 2 of 51

What data looks like: rows, columns and types

Tables, observations and variables, the main data types, tidy data, and how to inspect a table before trusting it.

In this lesson · about 30 minutes

  • Explain rows (observations) and columns (variables)
  • Classify a column as numeric (continuous or discrete), categorical (nominal or ordinal), date or text
  • Spot common data problems before analysing

Rows, columns and the grain

In a well-made table, each row is one observation (one order, one customer, one day) and each column is one variable (something measured or recorded about it). The grain is what one row stands for. Always say it out loud: "one row per order" is a very different table from "one row per branch per day", and mixing them up is the most common cause of wrong totals.

Data types

TypeWhat it isCafé exampleWhat you can do
Numeric, continuousAny value in a range, including decimalstotal ($8.75), temperatureAverage, sum, spread
Numeric, discreteCounts: whole numbersqty (2 muffins), visitsAverage, sum, count
Categorical, nominalLabels with no orderbranch, payment methodCount, group by, most common
Categorical, ordinalLabels with a natural ordercup size (S, M, L), rating (1–5 stars)Count, median, sort
Date and timeA point in time2026-03-01, 7 amGroup by day, month, weekday; time gaps
BooleanYes or noapp_user (1 or 0), churnedCount, proportion
Free textAnything typedcustomer commentsSearch, count words, language models

A number is not always numeric data. An order_id of 1001 is a label: averaging order IDs is meaningless. Ask, "Would adding two of these make sense?"

Structured and unstructured

Structured data fits rows and columns (sales, sensor readings). Unstructured data does not: photos, audio, emails, reviews. Most data-science jobs start with structured data, which is what this bootcamp uses.

Tidy data

Data is tidy when every column is one variable, every row is one observation and every cell holds one value. A spreadsheet with a column per month ("Jan sales", "Feb sales", …) is wide, not tidy: "month" is hidden in the column names. Tools like pandas and Tableau work best on tidy, long tables (columns: branch, month, sales). You will reshape between the two in Module 5.

Try it · data lab

Explore a real-looking table

Thirty café orders. Sort, filter and inspect each column the way a data scientist does before any analysis. Then switch to the raw till export and hunt for problems.

Click a column name to sort by it; click again to reverse.

#
010012026-03-01RiversideCroissantBakery13.53.5NewCard
110022026-03-01DowntownMuffinBakery4312ReturningCard
210032026-03-01RiversideBagelFood14.254.25NewCash
310042026-03-02AirportMuffinBakery133ReturningCash
410052026-03-02AirportChaiTea144ReturningApp
510062026-03-02DowntownCroissantBakery23.57ReturningCard
610072026-03-02CampusEspressoCoffee236NewCard
710082026-03-03RiversideLatteCoffee24.59ReturningCard
810092026-03-03AirportBagelFood24.258.5ReturningApp
910102026-03-04DowntownCroissantBakery43.514NewCard
1010112026-03-04DowntownMuffinBakery133ReturningCard
1110122026-03-05AirportGreen teaTea13.253.25ReturningApp
1210132026-03-06CampusEspressoCoffee133ReturningCash
1310142026-03-06CampusSandwichFood28.517NewCard
1410152026-03-07AirportGreen teaTea23.256.5ReturningCash
1510162026-03-07DowntownChaiTea144NewApp
1610172026-03-07AirportChaiTea144ReturningApp
1710182026-03-07CampusMuffinBakery236NewCard
1810192026-03-07AirportBagelFood14.254.25NewCash
1910202026-03-08AirportMuffinBakery4312NewCard
2010212026-03-08DowntownBagelFood14.254.25ReturningCash
2110222026-03-10RiversideSandwichFood18.58.5ReturningCard
2210232026-03-10CampusCroissantBakery23.57ReturningCard
2310242026-03-10AirportLatteCoffee14.54.5NewCash
2410252026-03-10DowntownSandwichFood48.534NewCard
2510262026-03-11DowntownLatteCoffee44.518ReturningCard
2610272026-03-11AirportCold brewCoffee14.754.75NewApp
2710282026-03-11CampusEspressoCoffee133NewCard
2810292026-03-11RiversideEspressoCoffee133NewCard
2910302026-03-13CampusBagelFood14.254.25NewCard

30 rows × 10 columns

Column total: decimal number (float)

Values

30

Missing

0

Unique

17

Mean

7.52

Ranges from 3 to 34. This is what pandas' describe() reports for a number column.

Sorting drill

What type of data is each column?

Classify each column from the café's tables.

  • total (order value in $)
  • temp_c (temperature)
  • qty (items in the order)
  • visits_90d (visits in 90 days)
  • payment (Card, App, Cash)
  • branch
  • cup size (Small, Medium, Large)
  • satisfaction (1 to 5 stars)
  • order_id
  • member_id (M0042)

0 of 10 sorted

Check your understanding0 of 3 correct

Question 1

1.A table has one row per branch per day. What is its grain?

Question 2

2.Columns named Jan, Feb, Mar each hold sales. What's the issue?

Question 3

3.Why is averaging order_id meaningless?

Quiz score: 0 of 3

Tip: answer every quiz question correctly first.

Written by Noviq Academy in its own words. Kettle & Crumb and all its data are made up for teaching; any resemblance to a real business is a coincidence. Python runs in your browser with Pyodide, so results can differ slightly from your own computer. Power BI, Tableau and other product names belong to their owners. Read-aloud uses your device's built-in voices.