← Years 5–6 Data & Information

Anonymising data

To remove or replace names and other identifying details in data, like using ID numbers, so people cannot be recognised.

Understanding Anonymising data in Years 5–6 Data & Information

What it does: Removing the name column takes away the most obvious identifier, so people cannot be recognised. Details like a street, birthday or class can still point to one person, so you check for them even after removing names. An ID number like 12 stands in for the name, so readers cannot tell who the student is. Anonymising protects privacy. It lets you share results without showing who gave the answers. Anonymising means checking for hidden identifiers as well as names. The street column should be removed too. An ID number replaces a name only if it does not give away who the person is.

Common mistakes: An address can identify a person, so it must be removed, not kept. The line should be remove_column(data, "Address"). To anonymise data you take names out, not add them. The line should be REMOVE "Name" FROM table.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 31–56) and word search (Modules 21–56).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which is a good way to anonymise a class survey?
Remove the Name column before sharingKeep the Name column but make the text smaller
Matches
Name column removed, but Street: 5 Oak Rd is still in the table
↓
A hidden identifier is left in. The address can still show who the person is, so the data is not anonymous.
Applying
Meanings
Term
anonymise
Meaning
To remove or replace names and other identifying details in data, like using ID numbers, so people cannot be recognised.
Practice
Step 1: Delete the Name column
Testing
Gaps
(surveydata)
Check Answer
Spots
3add_ids(data)
4keep_column(data, "Address")

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Desert Tortoise' badge — Desert Master, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which is a good way to anonymise a class survey?
A. Remove the Name column before sharing ✓
B. Keep the Name column but make the text smaller
Anonymising means removing names so people cannot be recognised. Making text smaller still shows the names.
2. Which one replaces a student's name with an ID number?
A. Mia scored 8 out of 10
B. Student 12 scored 8 out of 10 ✓
An ID number like 12 stands in for the name, so readers cannot tell who the student is.
3. Anonymised data means...
A. People in the data cannot be recognised ✓
B. The data has been deleted completely
Anonymising keeps the useful data but takes away the details that point to a person.
4. Which way of showing ages is better for keeping people anonymous?
A. Age groups like 10-11 and 12-13 ✓
B. Exact birthdays like 4 May 2013
Grouping ages makes it harder to work out who someone is. An exact birthday can point to one person.
5. A table has no names, but it lists 'Year 6 student who lives at 5 Wattle St'. What is the problem?
A. There is no problem because the names are gone
B. The address is a hidden identifier that could show who it is ✓
Always check for hidden identifiers like addresses, phone numbers and photos. They can still identify a person.

Match the Pairs

Student ID: S01 → An ID number used in place of a student's name so the person cannot be recognised
Age group: 10-11 → A grouped age that hides the exact age so a person is harder to identify
Anonymise a table by removing the column that shows who each person is → Delete column: Name
Check for hidden identifiers that could still show who someone is, like a rare detail → Check: street, birthday, class
Name column removed, but Street: 5 Oak Rd is still in the table → A hidden identifier is left in. The address can still show who the person is, so the data is not anonymous.
Name: Mia Lee changed to ID: Mia1 → The ID still contains the person's name, so Mia can still be recognised. Use a random ID like S01 instead.

Key Term

anonymise
To remove or replace names and other identifying details in data, like using ID numbers, so people cannot be recognised.

Fill in the Blanks

1. anonymise(survey_data)
Hint: Type the word for removing or replacing identifying details in data so people cannot be recognised.
2. remove_column(survey_data, "Name")
Hint: Type the function name that takes a whole column out of the table.
3. replace_with_id(survey_data, "Name")
Hint: Type the function name that swaps each person's name for an ID number.
4. if age >= 10 and age <= 11: age_group = "10-11"
Hint: Type the operator that means greater than or equal to, so ages are put into a group.
5. for column in survey_data: check_hidden_identifiers(column)
Hint: Type the keyword that repeats a check for every column, so no hidden identifier is missed.

Spot the Error

Question 1
A data = load("survey.csv")
B remove_column(data, "Name")
C add_ids(data)
D keep_column(data, "Address")
E save(data, "safe.csv")
Line D — An address can identify a person, so it must be removed, not kept. The line should be remove_column(data, "Address").
Question 2
A ADD "Name" TO table
B FOR EACH row IN table
C SET row.id TO next_number()
Line A — To anonymise data you take names out, not add them. The line should be REMOVE "Name" FROM table.
Question 3
A if age == 11:
B group = "10-12"
C else:
D group = "other"
Line A — Grouping ages means using a range, like 10 to 12. Checking one exact age does not group people, so they could still be recognised. It should be if age >= 10 and age <= 12:
Question 4
A names = ["Mia", "Leo", "Zoe"]
B ids = []
C for i in range(len(names)):
D ids.append(names[i])
E print(ids)
Line D — This adds each person's name to the ID list, so the names are still there. It should add an ID number: ids.append(i + 1).
Question 5
A hidden = ["Phone", "Email"]
B for col in hidden:
C remove(data, hidden)
D print("Checked")
Line C — The loop should remove one column at a time using the loop variable col. It should be remove(data, col).

Student with a class code? Join your class →