diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/collateral/common.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/collateral/common.py b/python/collateral/common.py index b91e210d..882a3a74 100644 --- a/python/collateral/common.py +++ b/python/collateral/common.py @@ -92,7 +92,8 @@ def send_email(d: datetime.date, df: pd.DataFrame) -> None: "CS": "Credit Suisse", } html = "<html><body>" - for cp, name in cp_mapping.items(): + for cp, df in df.groupby(level="broker"): + name = cp_mapping[cp] html += f"<h3> At {name}:</h3>\n{df.loc[cp].to_html(index=False)}" em = ExchangeMessage() em.send_email( |
