Skip to content

This project focuses on analyzing customer transactions, repayments, and spending behavior using credit card data. The objective is to extract valuable business insights by segmenting data across products, cities, and time periods. The analysis includes identifying top customers, high-revenue cities, seasonal trends, and category-wise spending.

Notifications You must be signed in to change notification settings

Dipesh-Ydv/CreditCard-Data-Analysis-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Credit Card Data Analysis πŸ§ΎπŸ’³

πŸ“˜ Business Problem

To improve decision-making in the modern credit card industry, PSPD Bank aims to evaluate customer behavior using transaction data. This analysis will help the bank proactively manage risks like bankruptcy and fraud, understand customer repayment behavior, and identify opportunities for tailored offers.

Mr. Jim Watson, CEO of PSPD Bank, has initiated this study to better analyze:

  • Spend patterns across demographics
  • Repayment behaviors
  • Profitability from interest on monthly spend

πŸ“Š Dataset Overview

The dataset comprises three sheets:

  • Customer Acquisition: Details about the customer at the time of card issuance
  • Spend: Transaction-level credit card spend data
  • Repayment: Repayment records for each customer

🧹 Data Preprocessing Rules

  1. If age < 18 β†’ Replace with mean age.
  2. If spend > card limit β†’ Replace with 50% of the limit.
  3. If repayment > card limit β†’ Replace with the card limit.

πŸ“ˆ Analysis Tasks

πŸ”’ Summaries to Extract

  • Total number of unique customers
  • Total number of distinct product categories
  • Average monthly spend per customer
  • Average monthly repayment per customer
  • Monthly profit calculation based on 2.9% interest rate

πŸ’‘ Insights to Generate

  • Top 5 product types
  • City with highest total spend
  • Age group spending the most
  • Top 10 customers based on total repayment

πŸ“ City-Wise Analysis

  • Annual spend per product by city with graphical representation

πŸ“‰ Graphs to Visualize

  • Monthly spend comparison, city-wise
  • Yearly spend on air tickets
  • Monthly product spend trends (for seasonality detection)

πŸ” Custom Python Function

A dynamic function is implemented to identify top 10 customers per city, based on:

  • Selected product type (Gold/Silver/Platinum)
  • Time frame (monthly/yearly)

This function allows flexible querying for targeted marketing and performance tracking.


πŸ› οΈ Tech Stack

  • Language: Python
  • Libraries: Pandas, NumPy, Matplotlib, Seaborn
  • IDE: Jupyter Notebook / VS Code

πŸ“ Project Structure

credit-card-analysis/
β”‚
β”œβ”€β”€ data/
β”‚   └── credit_card_data.xlsx
β”‚
β”œβ”€β”€ notebooks/
β”‚   └── Credit_Card_Analysis.ipynb
β”‚
β”œβ”€β”€ graphs/
β”‚   └── monthly_product_spend.png
β”‚   └── monthly_spend_city_wise.png
β”‚   └── yearly_air_ticket_spend.png
β”‚   └── yearly_total_spend_by_city_stacked_by_product.png
β”‚   └── yearly_total_spend_by_product_stacked_by_cities.png
β”‚
└── README.md

πŸš€ How to Run

  1. Clone the repository:

    git clone https://github.com/yourusername/credit-card-analysis.git
    cd credit-card-analysis
  2. Install dependencies:

    pip install -r requirements.txt
  3. Open and run the notebook:

    jupyter notebook notebooks/Credit_Card_Analysis.ipynb

πŸ“Œ Key Outcomes

  • Clear visibility into customer behavior
  • Identification of high-value customers and cities
  • Improved fraud detection through limit analysis
  • Enhanced profitability tracking for PSPD Bank

πŸ“ž Contact

For queries, reach out at: [dipeshyadav4444@gmail.com]

About

This project focuses on analyzing customer transactions, repayments, and spending behavior using credit card data. The objective is to extract valuable business insights by segmenting data across products, cities, and time periods. The analysis includes identifying top customers, high-revenue cities, seasonal trends, and category-wise spending.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published