Imagine that your teacher gives you a list containing the names and examination scores of 200 students.
Your teacher wants to know which student scored the highest, which students scored above 70, and how many students belong to JSS 2.
Will you read all 200 records one after another?
That could take a long time! Fortunately, you can use sorting, filtering, and data organisation to find the information quickly.
Data sorting is the process of arranging information in a particular order.
You can sort information alphabetically, numerically, or according to dates.
Sorting makes it easier to find information and understand how different records compare.
Imagine that a school has the following list of students:
| Student Name |
|---|
| Samuel |
| David |
| Mary |
| Grace |
| Peter |
| Student Name |
|---|
| David |
| Grace |
| Mary |
| Peter |
| Samuel |
Notice that the names are now arranged from A to Z.
There are two common ways to sort information: ascending order and descending order.
Ascending order means arranging information from the smallest to the largest, or from A to Z.
Examples:
Descending order means arranging information from the largest to the smallest, or from Z to A.
Examples:
| Student | Score |
|---|---|
| David | 85 |
| Mary | 65 |
| Samuel | 95 |
| Grace | 75 |
Ascending Order:
65, 75, 85, 95
Descending Order:
95, 85, 75, 65
Sorting is not only for names and numbers. You can also arrange dates and times.
For example, a school may have a list of examination dates. The school can arrange them from the earliest date to the latest.
| Subject | Examination Date |
|---|---|
| English | 26 November 2026 |
| Mathematics | 24 November 2026 |
| Basic Science | 25 November 2026 |
| Subject | Examination Date |
|---|---|
| Mathematics | 24 November 2026 |
| Basic Science | 25 November 2026 |
| English | 26 November 2026 |
Data filtering is the process of displaying only the information that meets a particular condition.
Imagine that your school has 500 students, but you want to see only students in JSS 2.
Instead of reading all 500 records, you can apply a filter to display only JSS 2 students.
| Name | Class | Score |
|---|---|---|
| David | JSS 2 | 85 |
| Mary | JSS 1 | 78 |
| Samuel | JSS 2 | 90 |
| Grace | JSS 3 | 65 |
| Peter | JSS 2 | 88 |
Filtering for JSS 2 gives us:
| Name | Class | Score |
|---|---|---|
| David | JSS 2 | 85 |
| Samuel | JSS 2 | 90 |
| Peter | JSS 2 | 88 |
Only the students in JSS 2 are displayed.
A filter condition is a rule that tells a computer which information should be displayed.
Here are some common examples:
| Condition | Meaning |
|---|---|
| Score greater than 70 | Display scores above 70. |
| Score less than 50 | Display scores below 50. |
| Class equals JSS 2 | Display only JSS 2 students. |
| City equals Ibadan | Display records for Ibadan. |
| Payment equals True | Display records marked as paid. |
| Symbol | Meaning | Example |
|---|---|---|
| > | Greater than | 80 > 70 |
| < | Less than | 40 < 50 |
| == | Equal to in many programming languages | 70 == 70 |
| != | Not equal to | 60 != 70 |
| >= | Greater than or equal to | 70 >= 70 |
| <= | Less than or equal to | 40 <= 50 |
Data organisation means arranging information in a structured way so that it is easy to understand, access, and manage.
A well-organised dataset usually has clear headings, consistent formats, and properly arranged records.
Imagine a small shop in Ibadan that sells rice, beans, cooking oil, and milk.
| Product | Category | Quantity Sold | Price (โฆ) |
|---|---|---|---|
| Rice | Food | 10 | 5,000 |
| Beans | Food | 8 | 3,000 |
| Cooking Oil | Food | 5 | 4,500 |
| Milk | Drinks | 12 | 2,000 |
This table is organised because each column has a clear heading and each row contains information about one product.
Grouping means putting similar records together based on a shared feature.
For example, a school can group students according to their classes.
JSS 1: Daniel, Peter, Esther.
JSS 2: David, Mary, Samuel.
JSS 3: Grace, John, Rebecca.
The students have been grouped according to their classes. This makes it easier for the school to manage each class.
Microsoft Excel and Google Sheets provide tools that make sorting and filtering easy.
Python is a programming language that can help us organise and transform data.
You do not need to become a programmer immediately. Let's look at a simple example.
scores = [85, 65, 90, 70, 95] scores.sort() print(scores)
Output:
[65, 70, 85, 90, 95]
The sort() instruction arranges the scores
from the smallest to the largest.
scores = [85, 65, 90, 70, 95] scores.sort(reverse=True) print(scores)
Output:
[95, 90, 85, 70, 65]
The reverse=True option changes the order
to descending.
scores = [85, 65, 90, 70, 95]
high_scores = []
for score in scores:
if score > 70:
high_scores.append(score)
print(high_scores)
Output:
[85, 90, 95]
The program checks each score and keeps only scores greater than 70.
A secondary school in Ibadan has collected examination results from five students.
| Name | Class | Score | City |
|---|---|---|---|
| Samuel | JSS 2 | 85 | Ibadan |
| Mary | JSS 1 | 65 | Oyo |
| David | JSS 2 | 95 | Ibadan |
| Grace | JSS 3 | 70 | Lagos |
| Peter | JSS 2 | 75 | Oyo |
Use Microsoft Excel, Google Sheets, or a notebook to complete the activity.
| Term | Simple Meaning |
|---|---|
| Sorting | Arranging information in a particular order. |
| Ascending Order | Arranging from smallest to largest or A to Z. |
| Descending Order | Arranging from largest to smallest or Z to A. |
| Filtering | Displaying only information that meets a condition. |
| Filter Condition | A rule used to select records. |
| Data Organisation | Arranging information in a structured way. |
| Grouping | Putting similar records together. |
In this module, you learned how to arrange, select, and organise information.
Answer all ten questions. Select one correct option for each question.