aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/collateral/cs.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/collateral/cs.py b/python/collateral/cs.py
index 0246e507..b70b32b9 100644
--- a/python/collateral/cs.py
+++ b/python/collateral/cs.py
@@ -104,10 +104,11 @@ def load_cs_positions(d: datetime.date, fund: str, legacy=False):
header=5,
skipfooter=28,
)
- if df.empty:
- raise ValueError(f"empty position statement for {d}")
+
df.columns = [c.replace("\n", " ").strip() for c in df.columns]
df = df[1:]
+ if df.empty:
+ raise ValueError(f"empty position statement for {d}")
for i, e in df["Structure ID"].items():
try:
int(e)