diff options
Diffstat (limited to 'python/intex/load_intex_collateral.py')
| -rw-r--r-- | python/intex/load_intex_collateral.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/intex/load_intex_collateral.py b/python/intex/load_intex_collateral.py index cb736240..e6963ed3 100644 --- a/python/intex/load_intex_collateral.py +++ b/python/intex/load_intex_collateral.py @@ -89,7 +89,10 @@ def upload_data(conn, workdate): temp = line["Amortization Schedule"].split("; ") temp = [e.split(" @ ") for e in temp] amounts, dates = zip(*temp) - amounts = [float(e.replace(",", "")) for e in amounts] + if '%' in amounts[0]: #for reinvestment assets amort is in percentage. + amounts = [float(e.replace("%", "")) / 100 for e in amounts] + else: + amounts = [float(e.replace(",", "")) for e in amounts] dates = [datetime.datetime.strptime(e, "%b %d, %Y").date() for e in dates] r[-1] = dates r.append(amounts) |
