Beginner Project • Basic Python

Python Data
Explorer

Load, inspect, clean and summarize a small customer dataset before building your first Ai model.

0% complete
Your work is saved automatically.Complete the fields below. Your answers stay in this browser.

A complete first data exploration

Create a Python project that loads, inspects, cleans and summarizes customer data. You will understand what the dataset contains before using it for Ai.

CSV datapandasData qualitySummary statisticsFilteringChart
Creating a Python projectLoading CSV dataUnderstanding rows and columnsChecking data typesFinding missing valuesRemoving duplicatesCalculating summariesFiltering and groupingCreating a chart
LevelBeginner
CodingBasic Python
Time60–90 minutes
SoftwarePython, VS Code and Jupyter or .py
Librariespandas + matplotlib

Explore the customer dataset

Run each code block, confirm its output, then mark the step complete.

Step 01

Install the packages

Prepare pandas for data work and matplotlib for the chart.

VS Code terminal
pip install pandas matplotlib
requirements.txt
pandas
matplotlib
Step 02

Load the dataset

Read the CSV file and handle a missing-file error clearly.

Python
import pandas as pd

file_path = "data/customer-data.csv"

try:
    df = pd.read_csv(file_path)
    print("Dataset loaded successfully.")
except FileNotFoundError:
    print(f"Dataset not found: {file_path}")
Expected result

Dataset loaded successfully.

Step 03

Inspect the data

Understand its size, columns, values and data types.

Python
print(df.head())
print(df.shape)
print(df.columns)
df.info()
Step 04

Check data quality

Find missing values and duplicates before changing the data.

Check quality
print("Missing values:")
print(df.isnull().sum())

print("\nDuplicate rows:")
print(df.duplicated().sum())
Clean the data
df = df.drop_duplicates()

df["Monthly Spending"] = df["Monthly Spending"].fillna(
    df["Monthly Spending"].median()
)
Important

Replace each column name with the exact name used in your dataset. Check why a row is duplicated before removing it.

Step 05

Summarize the dataset

Calculate useful numerical and category summaries.

Python
print(df.describe())

average_spending = df["Monthly Spending"].mean()
average_purchases = df["Number of Purchases"].mean()

print("Average monthly spending:", round(average_spending, 2))
print("Average number of purchases:", round(average_purchases, 2))
print(df["Membership Type"].value_counts())
Step 06

Filter and group the data

Find high-spending customers and compare membership groups.

Python
high_spending_customers = df[df["Monthly Spending"] > 100]
print(high_spending_customers.head())

membership_summary = (
    df.groupby("Membership Type")["Monthly Spending"]
    .mean()
    .sort_values(ascending=False)
)

print(membership_summary)
Step 07

Create a simple chart

Visualise average spending across membership groups.

Python
import matplotlib.pyplot as plt

membership_summary.plot(kind="bar")

plt.title("Average Spending by Membership Type")
plt.xlabel("Membership Type")
plt.ylabel("Average Monthly Spending")
plt.tight_layout()
plt.show()
Expected result

A bar chart comparing average spending across membership groups.

Complete your project evidence

Cleaned datasetPython notebook or scriptData summaryOne chartThree findingsREADME file

Write three important findings

Responsible data check

Confirm your Data Explorer

Portfolio explanation

I created a Python Data Explorer using pandas. I loaded and inspected a customer dataset, checked data types, handled missing values, removed duplicates, calculated summary statistics and created a chart comparing customer groups. This project developed my basic Python, data-cleaning and exploratory-analysis skills.

Next project

Project 03 — Rule-Based Learning Path Recommender

Turn clear human-defined rules into a working recommendation system.

Start Project 03