Sunday, 06 September 2026
Advertisement Advertise Your advert could be here Reach thousands of learners and ICT professionals across Rwanda. Contact us
Advertisement Opportunity Jobs, scholarships & hackathons Fresh openings from Rwandan job boards are pulled in every hour. See openings

How data is organised: rows, columns and types

Data science from zero (no IT background) · lesson 2 of 12

In this lesson: Read a data table correctly and name the type of every column in it.

Almost all data you will meet is a table. If you have ever seen a class register or a receipt book, you already know the shape.

student_id | name      | age | district | term_mark | passed
-----------+-----------+-----+----------+-----------+-------
1          | Aline     | 17  | Gasabo   | 78        | yes
2          | Jean      | 18  | Huye     | 41        | no
3          | Uwase     | 17  | Gasabo   | 65        | yes

The vocabulary

  • A row (also called a record or observation) is one thing you measured — here, one student.
  • A column (also called a variable, field or feature) is one thing you measured about every row — here, age or district.
  • A cell is one value: the age of student 2.
The rule that saves you weeks: one row = one thing, one column = one measurement, one cell = one value. A spreadsheet where somebody typed "78 (absent for exam)" into a marks column has broken that rule, and every tool you use will complain.

The four types of data

Which calculations are allowed depends entirely on the type of the column. Get this wrong and you will compute nonsense.

  • Nominal — names with no order. District, gender, phone brand. You can count them. You cannot average them: "the average district" is meaningless.
  • Ordinal — ordered labels with unequal gaps. Satisfaction (poor / fair / good), education level. You can sort and take a median. Averaging is questionable.
  • Interval / ratio (numeric) — real numbers you can add and average. Age, mark, price, rainfall in mm.
  • Datetime — a moment in time. Looks like text, behaves like a number, and causes more bugs than every other type combined.

The trap: numbers that are not numbers

A column can hold digits and still be nominal:

student_id : 1, 2, 3      -> a name, not a quantity. Average = nonsense.
phone      : 0788123456   -> a name. Also loses its leading 0 if stored as a number.
year       : 2026         -> ordinal-ish. 2026 + 2025 means nothing.
term_mark  : 78           -> a real number. Average = meaningful.

Ask yourself: does adding two of these values produce something real? If not, it is a label that happens to be written with digits.

Wide and long

The same facts can be laid out two ways. Wide puts each period in its own column:

name  | term1 | term2 | term3
Aline | 78    | 81    | 74

Long (also called tidy) puts each measurement on its own row:

name  | term  | mark
Aline | term1 | 78
Aline | term2 | 81
Aline | term3 | 74

People read wide more easily. Tools compute on long more easily. You will convert between them constantly, and there is a one-line command for it in the pandas track.

Try it yourself

Find any real table — a receipt, a class list, a football league table. Write out its column names and label each one nominal, ordinal, numeric or datetime. Then find one cell that breaks the "one cell, one value" rule. There is almost always one.

Create a free account to save progress

All lessons in this track

  1. 1
  2. 2
  3. 3
  4. 4
    Your first program, and how to run it ~20 min account needed
  5. 5
    Variables, numbers, text and input ~25 min account needed
  6. 6
  7. 7
  8. 8
    Functions: naming a piece of work ~25 min account needed
  9. 9
    Reading a real data file: CSV ~30 min account needed
  10. 10
  11. 11
    pip and virtual environments ~25 min account needed
  12. 12
Advertisement Yanjye Learn a new digital skill this week ICT, programming and professional courses with graded weekly assignments. Start free