Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
โ† Data Analysis for Non-Technical Users ยท Lesson 6 of 9

Module Five

๐Ÿ“– Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
6

Module 5: Cleaning and Preparing Data

Module Introduction

Welcome to Module 5!

Imagine your school has a spreadsheet containing the names, ages, phone numbers and examination scores of 500 students. However, some names are spelt incorrectly, some students appear twice, and some records have missing information.

Can you analyse this information and expect to get correct results?

Probably not!

Before analysing data, you must make sure the information is accurate, complete and properly organised. This process is called Data Cleaning.

In this module, you will learn how to identify mistakes, remove duplicate records, correct errors and prepare information for analysis using simple examples.

Lesson 1: What Is Data Cleaning?

Data cleaning is the process of finding and correcting errors, removing unnecessary information and improving the quality of a dataset.

Think about cleaning your bedroom. Before arranging your books and clothes, you may need to remove rubbish, put misplaced items in the right places and organise everything properly.

Data cleaning works in a similar way. It helps you organise information so that it can be used correctly.

Examples of data problems include:

  • Names that are spelt incorrectly.
  • Missing phone numbers.
  • Repeated customer records.
  • Incorrect dates.
  • Numbers entered in the wrong columns.
  • Different formats used for the same information.

A data analyst must identify these problems before using the information to make decisions.

Lesson 2: Why Is Data Cleaning Important?

Imagine a supermarket wants to know how many bottles of water it sold last month. Unfortunately, some sales records were entered twice.

If the supermarket uses these incorrect records, it may believe it sold more bottles than it actually did.

This could lead to poor business decisions.

Data cleaning is important because it helps to:

  1. Improve Accuracy: It helps ensure that information is correct.
  2. Remove Mistakes: It helps identify spelling errors, incorrect numbers and other problems.
  3. Avoid Wrong Decisions: Clean information helps people make better decisions.
  4. Save Time: Properly organised information is easier to understand and analyse.
  5. Improve Reports: Accurate information produces more reliable reports and charts.

Lesson 3: Identifying Missing Information

Missing information happens when some details that should be included in a dataset are not available.

For example, a school may have a spreadsheet containing students' names, ages and examination scores. However, some students may not have examination scores recorded.

Example of a dataset with missing information:

Student Name Age Examination Score
John1375
Mary12
David1465
Sarah90
Peter1380

Can you identify the problem?

  • Mary's examination score is missing.
  • Sarah's age is missing.

How Can You Handle Missing Information?

There are different ways to handle missing information, depending on the situation.

  • Check the original record: Find out whether the information was recorded somewhere else.
  • Ask for the missing information: If possible, contact the person responsible for the record.
  • Leave it blank: If the information is genuinely unavailable, keep it blank and record that it is missing.
  • Use an appropriate estimate: In some types of analysis, an analyst may use an average or another suitable value, but only when it makes sense.

Important: Never invent information just to fill an empty space. An incorrect value can make your analysis unreliable.

Lesson 4: Removing Duplicate Records

A duplicate record is information that appears more than once when it should only appear once.

Imagine a school accidentally records the same student twice in its database.

Example:

Student ID Student Name Class
ST001JohnJSS 2
ST002MaryJSS 2
ST003DavidJSS 2
ST002MaryJSS 2
ST004SarahJSS 2

The record for Mary appears twice with the same student ID. This is a duplicate record.

Why Should You Remove Duplicates?

  • They can increase the number of records incorrectly.
  • They can affect calculations and reports.
  • They can create confusion when searching for information.
  • They can cause businesses to contact the same customer unnecessarily.

How to Remove Duplicates in Microsoft Excel

  1. Open your spreadsheet in Microsoft Excel.
  2. Select the table or data range you want to clean.
  3. Click the Data tab on the menu.
  4. Look for the Remove Duplicates option.
  5. Select the columns Excel should check.
  6. Click OK to remove duplicate records.

Before removing duplicates, make a backup copy of your data. Also, check whether records are truly duplicates. Two different people may have the same name but different student IDs.

Lesson 5: Correcting Spelling and Formatting Errors

Sometimes, information is entered incorrectly because of typing mistakes or inconsistent formatting.

For example, a business may record the name of the same town in different ways.

Example:

Original Entries Corrected Entry
IbadanIbadan
ibadanIbadan
IBADANIbadan
IbadnIbadan

Although these entries may refer to the same location, they are written differently.

If you are counting the number of customers from Ibadan, these differences may cause problems when grouping the information.

Other Examples of Formatting Problems

  • Writing dates as 01/12/2026 and 1 December 2026 in the same column.
  • Recording phone numbers with different formats.
  • Mixing uppercase and lowercase letters unnecessarily.
  • Entering currency values inconsistently.
  • Adding unnecessary spaces before or after names.

Consistent formatting makes information easier to search, compare and analyse.

Lesson 6: Organising Inconsistent Data

Inconsistent data means information that follows different formats or rules even though it should be organised in the same way.

Imagine a business records its customers' phone numbers like this:

  • 08012345678
  • +2348012345678
  • 0801 234 5678
  • 080-1234-5678

These entries may represent phone numbers written in different formats.

A data analyst may need to standardise the format so that all records follow the same pattern.

How to Organise Inconsistent Data

  1. Identify information that is written differently.
  2. Decide on a standard format.
  3. Correct entries that do not follow the format.
  4. Check the information again.
  5. Save the cleaned dataset.

For example, you may decide that all dates in a school attendance spreadsheet should use the format DD/MM/YYYY.

Lesson 7: Practical Exercise โ€“ Cleaning a Student Records Spreadsheet

Now let's put what you have learned into practice.

Imagine you work as an assistant in a school office. Your teacher gives you the following student records and asks you to clean the information.

Original Student Records:

Student ID Student Name Age Class Score
ST001John13JSS 275
ST002MARY12JSS 285
ST003David14JSS 265
ST002Mary12JSS 285
ST004SarahJSS 290
ST005Peter13JSS 280

Identify the problems:

  1. Mary's record appears twice.
  2. Mary's name is written in uppercase in one record.
  3. Sarah's age is missing.

Your cleaning tasks:

  1. Identify the duplicate student record.
  2. Standardise the spelling and appearance of students' names.
  3. Find out whether Sarah's age can be recovered from the original school record.
  4. Remove the duplicate only after confirming that it is the same student.
  5. Save the cleaned spreadsheet as a new file.

Your goal is to produce a dataset that is accurate, organised and ready for analysis.

Important Data Cleaning Tips

  • Always keep an original copy of your dataset.
  • Check information before making changes.
  • Do not delete records simply because they look different.
  • Never guess missing information.
  • Use consistent formats for dates, names and numbers.
  • Review your cleaned data before using it.
  • Protect private information when handling records.

Module Summary

In this module, you have learned that:

  • Data cleaning means identifying and correcting problems in a dataset.
  • Clean data helps people make better decisions.
  • Missing information should be investigated and handled carefully.
  • Duplicate records are repeated entries that should be checked.
  • Spelling and formatting errors can affect data analysis.
  • Inconsistent information should be organised using standard formats.
  • Microsoft Excel can help identify and remove duplicate records.
  • Always preserve an original copy before cleaning data.

Practical Activity

Imagine you are helping a small supermarket organise its customer records. You discover the following information:

Customer ID Customer Name Location Phone Number
C001JohnIbadan08012345678
C002MARYibadan08023456789
C003DavidLagos
C002MaryIbadan08023456789
C004SarahAbuja08034567890

Your tasks:

  1. Identify the duplicate customer record.
  2. Identify the inconsistent location entries.
  3. Identify the missing phone number.
  4. Standardise the customer names.
  5. Explain how you would correct the problems.

Knowledge Check

Answer these questions to test your understanding.

  1. What is data cleaning?
  2. Why is data cleaning important?
  3. What is missing data?
  4. Mention three examples of data errors.
  5. What is a duplicate record?
  6. Why should duplicate records be checked before removal?
  7. What does data consistency mean?
  8. How can you remove duplicates in Microsoft Excel?
  9. Why should you keep an original copy of your dataset?
  10. Why should you avoid guessing missing information?

Congratulations!

You have successfully completed Module 5: Cleaning and Preparing Data.

You now understand how to identify missing information, remove duplicate records, correct mistakes and organise information properly.

Remember, good analysis starts with good data!

In the next module, you will discover how to present information using charts, graphs and data visualisation. You will learn how to turn numbers into pictures that make information easier to understand.

๐Ÿ† Get Certified

๐Ÿ”’

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (โ‚ฆ2,000 or 20,000 coins), and get a verified certificate with your name on it.

๐ŸŽ“ Sign Up to Get Certified
๐Ÿ› ๏ธ Practice Tools
Hands-on simulators & labs - subscription required.
โ†’
๐ŸŽฏ Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
โ†’