Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

E-Commerce Orders Data Cleaning and Preparation

Cleaned and prepared a raw e-commerce sales orders dataset using Microsoft Excel. Replaced missing values, standardized text casing and capitalization, corrected data types across all 13 columns, removed redundant columns, and validated consistency across categorical fields to produce an analysis-ready dataset.


Table of Contents


Project Overview

This project focuses on the cleaning and preparation of a raw e-commerce sales orders dataset using Microsoft Excel. The dataset contained multiple data quality issues including missing values, inconsistent text formatting, incorrect data types, and redundant columns. Each issue was systematically identified and resolved to produce a clean, structured, and analysis-ready dataset.


Dataset

The dataset is an e-commerce orders table consisting of 13 columns:

Column Description
OrderID Unique identifier for each order
Date Date the order was placed
CustomerID Unique identifier for each customer
Product Name of the product ordered
Quantity Number of units ordered
UnitPrice Price per unit
ShippingAddress Delivery address
PaymentMethod Method used for payment
OrderStatus Current status of the order
TrackingNumber Shipment tracking identifier
ItemsInCart Total items in the customer's cart
CouponCode Discount code applied, if any
ReferralSource Channel through which the customer was referred

Cleaning Steps

1. Handled Missing Values

The CouponCode column contained blank cells where no discount code was applied. These were replaced with "No Coupon" to make the absence of a coupon explicit and preserve all records rather than removing rows.

2. Standardized Text Formatting

Categorical columns including Product, PaymentMethod, OrderStatus, and ReferralSource had inconsistent casing and spacing. Proper capitalization was applied and unnecessary whitespace was trimmed to ensure uniform values across the dataset.

3. Corrected Data Types

Each column was audited and assigned its correct data type:

  • Date — converted to proper date format
  • Quantity, UnitPrice, ItemsInCart — validated as numeric types
  • OrderID, CustomerID, TrackingNumber — kept as text since they are identifiers, not values to be calculated

4. Removed Redundant Columns

Columns that offered no analytical value were identified and removed to keep the dataset lean and focused.

5. Validated Consistency

A column-level consistency check was performed to confirm that categorical fields such as OrderStatus contained only valid, expected values and that no duplicate order records existed.


Data Types Reference

Column Correct Data Type Notes
OrderID Text Identifier — not used in arithmetic
Date Date Converted from text format
CustomerID Text Identifier — not numeric
Product Text Categorical
Quantity Number (Integer) Whole numbers only
UnitPrice Number (Decimal) Pricing values
ShippingAddress Text Free-text field
PaymentMethod Text Categorical
OrderStatus Text Categorical
TrackingNumber Text Identifier — not numeric
ItemsInCart Number (Integer) Whole numbers only
CouponCode Text Nulls replaced with "No Coupon"
ReferralSource Text Categorical

Tools Used

  • Microsoft Excel

Key Takeaways

  • Real-world datasets are rarely clean — even structured spreadsheets carry hidden issues such as inconsistent casing, wrong data types, and ambiguous blank cells.
  • Filling missing values with meaningful placeholders such as "No Coupon" is preferable to dropping rows, as the absence of a value can itself be informative.
  • Enforcing correct data types early prevents errors and inconsistencies during analysis.
  • A structured, column-by-column approach to cleaning ensures no issues are overlooked.

About

Cleaned a raw e-commerce orders dataset using Microsoft Excel. Replaced missing values, standardized text casing and capitalization, corrected data types across all 13 columns, removed redundant columns, and validated consistency across categorical fields to produce an analysis-ready dataset.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors