statement-parser 0.0.11__tar.gz → 0.0.12__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.
- {statement_parser-0.0.11/statement_parser.egg-info → statement_parser-0.0.12}/PKG-INFO +1 -1
- {statement_parser-0.0.11 → statement_parser-0.0.12}/pyproject.toml +1 -1
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser/Bank.py +5 -1
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser/banks/HdfcCredit.py +2 -3
- {statement_parser-0.0.11 → statement_parser-0.0.12/statement_parser.egg-info}/PKG-INFO +1 -1
- {statement_parser-0.0.11 → statement_parser-0.0.12}/LICENSE +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/README.md +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/setup.cfg +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser/Transaction.py +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser/__init__.py +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser/banks/HsbcCredit.py +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser/banks/HsbcDebit.py +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser/banks/IciciCredit.py +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser/banks/IciciDebit.py +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser/banks/KotakDebit.py +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser/banks/Wallet.py +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser.egg-info/SOURCES.txt +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser.egg-info/dependency_links.txt +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser.egg-info/requires.txt +0 -0
- {statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: statement_parser
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.12
|
|
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
|
|
@@ -85,6 +85,10 @@ class Bank(ABC):
|
|
|
85
85
|
def parse_date(self, date_str):
|
|
86
86
|
try:
|
|
87
87
|
# Adjust for your date format
|
|
88
|
-
|
|
88
|
+
# check if date is less than 1990
|
|
89
|
+
parsed_date=parser.parse(date_str, dayfirst=True)
|
|
90
|
+
if parsed_date.year < 1900:
|
|
91
|
+
return None
|
|
92
|
+
return parsed_date
|
|
89
93
|
except ValueError:
|
|
90
94
|
return None # Handle invalid dates
|
|
@@ -49,8 +49,7 @@ class HdfcCredit(Bank):
|
|
|
49
49
|
"AMT",
|
|
50
50
|
"Debit / Credit "])
|
|
51
51
|
# filter out empty rows
|
|
52
|
-
|
|
53
|
-
df_filtered = df_full[df_full.iloc[:, 0] == "Domestic"]
|
|
52
|
+
df_filtered = df_full[df_full.iloc[:, 1].notna()]
|
|
54
53
|
df_filtered.columns = df_filtered.columns.str.strip()
|
|
55
54
|
df_filtered.loc[:, "DATE"] = df_filtered["DATE"].apply(self.parse_date)
|
|
56
55
|
# Filter out rows where "DATE" is NaT
|
|
@@ -79,7 +78,7 @@ class HdfcCredit(Bank):
|
|
|
79
78
|
# Change Cr to upper case and remove spaces
|
|
80
79
|
df["Debit / Credit"] = df["Debit / Credit"].str.upper().str.strip()
|
|
81
80
|
# df["DATE"] = df["DATE"].apply(self.parse_date)
|
|
82
|
-
print(df)
|
|
81
|
+
# print(df)
|
|
83
82
|
df["Seq"] = (
|
|
84
83
|
df.groupby(["DATE", "Description", "AMT", "Debit / Credit"])
|
|
85
84
|
.cumcount()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: statement_parser
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.12
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{statement_parser-0.0.11 → statement_parser-0.0.12}/statement_parser.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|