-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/amazon-mapping
- Loading branch information
Showing
26 changed files
with
1,117 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
.idea/ | ||
example*.log | ||
examples/.ipynb_checkpoints/* | ||
.*.sw* | ||
|
||
# C extensions | ||
*.so | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from __future__ import ( | ||
absolute_import, division, print_function, unicode_literals) | ||
|
||
from operator import itemgetter | ||
|
||
# Schwab Bank includes three lines of text in their CSV which otherwise break | ||
# date parsing. Filtering by lines with no "Type" (and faking out the date for | ||
# those lines) avoids the problem. | ||
|
||
# Note: Ideally, we could get account_id from the first line of the CSV. | ||
|
||
mapping = { | ||
'first_row': 1, | ||
'has_header': True, | ||
'filter': lambda tr: tr.get('Type'), | ||
'is_split': False, | ||
'bank': 'Charles Schwab Bank, N.A.', | ||
'bank_id': '121202211', | ||
'account_id': '12345', # Change to your actual account number if desired | ||
'currency': 'USD', | ||
'account': 'Charles Schwab Checking', | ||
'date': lambda tr: tr.get('Date') if tr.get('Type') else "1-1-1970", | ||
'check_num': itemgetter('Check #'), | ||
'payee': itemgetter('Description'), | ||
'desc': itemgetter('Description'), | ||
'type': lambda tr: 'debit' if tr.get('Withdrawal (-)') != '' else 'credit', | ||
'amount': lambda tr: tr.get('Deposit (+)') or tr.get('Withdrawal (-)'), | ||
'balance': itemgetter('RunningBalance'), | ||
} |
Oops, something went wrong.