End-to-end customer behavior analysis using Python (Pandas), PostgreSQL, and Power BI. Performed data cleaning, SQL queries, and built an interactive dashboard to uncover retail insights and drive business decisions.
This project follows an end-to-end data pipeline:
- Data Cleaning & Transformation (Python - Jupyter Notebook)
- Data Analysis & Queries (SQL - PostgreSQL)
- Data Visualization (Power BI Dashboard)
- Python (Pandas for data cleaning)
- PostgreSQL (Database management & SQL queries)
- Power BI (Interactive dashboard creation)
- Jupyter Notebook (For Python code execution)
- File:
customer_shopping_behavior.csv - Rows: 3900 customer records
- Columns: 18 features including:
- Customer demographics (Age, Gender, Location)
- Purchase details (Item, Category, Amount)
- Behavioral data (Discount usage, Subscription status, Review ratings)
- Loaded and explored the dataset
- Handled missing values in review ratings
- Created new features:
- Age groups (Young Adult, Adult, Middle-aged, Senior)
- Purchase frequency in days
- Cleaned column names and removed duplicate columns
- Exported clean data to PostgreSQL database
Created 10+ analytical queries to answer business questions like:
- Revenue comparison between male and female customers
- Top products by average review rating
- Customer segmentation (New, Returning, Loyal)
- Impact of discounts on purchase behavior
- Revenue contribution by age groups
- Subscription status vs spending patterns
Built an interactive dashboard showing:
- Customer demographics overview
- Revenue and sales metrics
- Purchase patterns by category
- Shipping type preferences
- Visual breakdowns by age group and gender
customer_shopping_behavior.ipynb- Python data cleaning notebookCustomer_behavior_SQL.sql- All SQL queries used for analysisCustomer_Behavior_Dashboard.pbix- Power BI dashboard filecustomer_shopping_behavior.csv- Original dataset
- Install required Python packages:
pip install pandas sqlalchemy psycopg2-binary
- Run the Jupyter notebook for data cleaning
- Import the SQL file into PostgreSQL/PgAdmin
- Open the Power BI file to view the dashboard
- Male customers generate higher revenue than female customers
- Subscribed customers spend more on average
- Free shipping is most popular but express shipping customers spend more
- Middle-aged customers contribute most to revenue
- Discounts significantly impact purchase decisions

Interactive Power BI dashboard showing customer demographics, purchase patterns, and behavioral insights.
- GitHub Repository: https://github.com/ThisAkshat/Customer-s_Behavior_Analysis.git
- Tools Used: Python, PostgreSQL, Power BI, Jupyter Notebook