This project is part of my Elevvo Internship (Data Analytics Track).
The objective was to perform customer segmentation on the Online Retail dataset using RFM (Recency, Frequency, Monetary) analysis to identify key customer groups and suggest actionable marketing strategies.
- Source: Online Retail Dataset (UCI)
- Data includes invoice details, customer IDs, quantities, unit prices, and purchase dates.
- Python
- Pandas
- Matplotlib
- Seaborn
- Jupyter Notebook
- Data Loading – Import the Excel dataset into a Pandas DataFrame
- Data Cleaning – Remove missing CustomerIDs, filter negative/zero quantities or prices, convert data types for memory efficiency
- Calculating RFM Metrics – Compute Recency, Frequency, and Monetary value per customer
- Assigning RFM Scores – Score each metric from 1–4 based on quartiles
- Segmentation – Classify customers into segments like Champions, Loyal Customers, At Risk, and Others
- Data Visualization – Create bar charts and heatmaps to analyze RFM patterns
- Insights & Marketing Suggestions – Provide actionable recommendations for each segment
- Champions: High recency, frequency, and monetary — top customers to reward
- Loyal Customers: Frequent buyers — encourage repeat purchases and cross-selling
- At Risk: Inactive or infrequent buyers — target with re-engagement campaigns
- Others: Moderate or new customers — monitor and engage lightly
- Install dependencies:
pip install -r requirements.txt - Open the notebook:
jupyter notebook Customer_Segmentation_RFM.ipynb

