statement-parser 0.0.7__tar.gz → 0.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {statement_parser-0.0.7/statement_parser.egg-info → statement_parser-0.0.9}/PKG-INFO +1 -1
  2. {statement_parser-0.0.7 → statement_parser-0.0.9}/pyproject.toml +1 -1
  3. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser/banks/HdfcCredit.py +3 -1
  4. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser/banks/IciciCredit.py +3 -3
  5. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser/banks/KotakDebit.py +2 -2
  6. {statement_parser-0.0.7 → statement_parser-0.0.9/statement_parser.egg-info}/PKG-INFO +1 -1
  7. {statement_parser-0.0.7 → statement_parser-0.0.9}/LICENSE +0 -0
  8. {statement_parser-0.0.7 → statement_parser-0.0.9}/README.md +0 -0
  9. {statement_parser-0.0.7 → statement_parser-0.0.9}/setup.cfg +0 -0
  10. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser/Bank.py +0 -0
  11. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser/Transaction.py +0 -0
  12. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser/__init__.py +0 -0
  13. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser/banks/HsbcCredit.py +0 -0
  14. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser/banks/HsbcDebit.py +0 -0
  15. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser/banks/IciciDebit.py +0 -0
  16. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser/banks/Wallet.py +0 -0
  17. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser.egg-info/SOURCES.txt +0 -0
  18. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser.egg-info/dependency_links.txt +0 -0
  19. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser.egg-info/requires.txt +0 -0
  20. {statement_parser-0.0.7 → statement_parser-0.0.9}/statement_parser.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: statement_parser
3
- Version: 0.0.7
3
+ Version: 0.0.9
4
4
  Summary: Bank Statement Parser is a Python library designed to parse and normalize transaction data from various bank statement formats ( CSV, Excel, etc.) into a consistent and easy-to-use Pandas DataFrame. It supports multiple banks and file formats, making it a versatile tool for financial data analysis.
5
5
  Author-email: Khuzema Challawala <khuzema.ac@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "statement_parser"
7
- version = "0.0.7"
7
+ version = "0.0.9"
8
8
  authors = [
9
9
  { name="Khuzema Challawala", email="khuzema.ac@gmail.com" },
10
10
  ]
@@ -76,8 +76,10 @@ class HdfcCredit(Bank):
76
76
  df["AMT"] = df["AMT"].astype(str)
77
77
  df["AMT"] = df["AMT"].str.replace(",", "")
78
78
  df[["AMT"]] = df[["AMT"]].astype(float)
79
+ # Change Cr to upper case and remove spaces
80
+ df["Debit / Credit"] = df["Debit / Credit"].str.upper().str.strip()
79
81
  # df["DATE"] = df["DATE"].apply(self.parse_date)
80
-
82
+ print(df)
81
83
  df["Seq"] = (
82
84
  df.groupby(["DATE", "Description", "AMT", "Debit / Credit"])
83
85
  .cumcount()
@@ -67,9 +67,9 @@ class IciciCredit(Bank):
67
67
  df[["Amount(in Rs)"]] = df[["Amount(in Rs)"]].astype(float)
68
68
  df["Date"] = df["Date"].apply(self.parse_date)
69
69
 
70
- if df["Sr.No."].max() != len(df):
71
- raise ValueError("No. of rows does not match {} != {}"
72
- .format(len(df), df["Sr.No."].max()))
70
+ # if df["Sr.No."].max() != len(df):
71
+ # raise ValueError("No. of rows does not match {} != {}"
72
+ # .format(len(df), df["Sr.No."].max()))
73
73
  # to handle duplicate on same day
74
74
  df["Seq"] = (
75
75
  df.groupby(["Date", "Transaction Details", "Amount(in Rs)"])
@@ -75,8 +75,8 @@ class KotakDebit(Bank):
75
75
  df["Transaction Date"], format="%d-%m-%Y"
76
76
  )
77
77
 
78
- # if df["Sl. No."].max() != len(df):
79
- # raise ValueError("No. of rows does not match")
78
+ if df["Sl. No."].max() != len(df):
79
+ raise ValueError("No. of rows does not match")
80
80
  # to handle duplicate on same day
81
81
  df["Seq"] = (
82
82
  df.groupby(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: statement_parser
3
- Version: 0.0.7
3
+ Version: 0.0.9
4
4
  Summary: Bank Statement Parser is a Python library designed to parse and normalize transaction data from various bank statement formats ( CSV, Excel, etc.) into a consistent and easy-to-use Pandas DataFrame. It supports multiple banks and file formats, making it a versatile tool for financial data analysis.
5
5
  Author-email: Khuzema Challawala <khuzema.ac@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3