aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/collateral/jpm.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/collateral/jpm.py b/python/collateral/jpm.py
index f1813975..27a62ee4 100644
--- a/python/collateral/jpm.py
+++ b/python/collateral/jpm.py
@@ -90,8 +90,10 @@ def collateral(d, dawn_trades, *, fund="BowdSt", **kwargs):
excel_file,
sheet_name="Open Positions",
skiprows=14,
- skipfooter=13,
+ skipfooter=12,
)
+ # JP has a total column only if there is more than 1 trade
+ df = df.iloc[:-1] if len(df) > 1 else df
df["Deal ID"] = "810RI" + df["Deal ID"].str.extract(r"([^-]*)-.*")
collat_df = pd.read_excel(excel_file, sheet_name="Collateral Holdings")
collat = collat_df.iloc[-1][-1]