GithubHelp home page GithubHelp logo

islamshahil / banking-data-analysis Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5 KB

This script analyzes banking transaction data, focusing on data cleaning, analysis, and anomaly detection. The analysis includes reconciling transactions and identifying anomalies based on transaction amounts.

Python 100.00%

banking-data-analysis's Introduction

Banking Data Analysis Script

Overview

This script analyzes banking transaction data, focusing on data cleaning, analysis, and anomaly detection. The analysis includes reconciling transactions and identifying anomalies based on transaction amounts.

How to Run

  1. Ensure you have Python installed on your system.

  2. Install the required libraries by running the following command:

    pip install pandas
    
  3. Download the script (banking_analysis.py) and the CSV data file (banking_data_assignment.csv) to the same directory.

  4. Open a terminal or command prompt in the directory where the script and CSV file are located.

  5. Run the script by executing the following command:

    python banking_analysis.py
    
  6. The script will output the summary report, displaying discrepancies in reconciliation and a list of detected anomalies.

Data Cleaning

The data cleaning process involves two main steps:

  • Account Number: Removing special characters from the 'Account Number' column using regular expressions.
  • Amount: Converting the 'Amount' column to numeric format, handling non-numeric characters and currency symbols.

Data Analysis

The data analysis process consists of the following steps:

  1. Sorting: The dataset is sorted chronologically by the 'Transaction Date' column.
  2. Separating Totals: Subtotal and yearly total rows are separated into a separate DataFrame (totals).
  3. Closing Balance Calculation: A closing balance is maintained after each transaction, assuming an initial balance of 0.0.
  4. Anomaly Detection: Transactions with amounts significantly higher than the mean or median are flagged as anomalies.

Interpretation of Output

The script generates a summary report with the following information:

  1. Discrepancies in Reconciliation: The difference between the total amounts in the original data and the total amounts in the 'totals' DataFrame.
  2. Detected Anomalies: A list of transactions flagged as anomalies, including transaction details.

Additional information, such as the total number of transactions and the closing balance after the last transaction, is also provided.

banking-data-analysis's People

Contributors

islamshahil avatar

Stargazers

Armen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.