diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/load_globeop_report.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/python/load_globeop_report.py b/python/load_globeop_report.py index 5ba43190..07a96681 100644 --- a/python/load_globeop_report.py +++ b/python/load_globeop_report.py @@ -106,10 +106,9 @@ def cds_reports(): return df def monthly_pnl_bycusip(df, strats): - df = df[(df.Strat.isin(strats)) & (df.CustAcctName=='V0NSCLMAMB')] - pnl_cols = ['BookUnrealMTM', 'BookRealMTM', 'BookRealIncome', 'BookUnrealIncome', - 'TotalBookPL'] - return df.groupby('InvId').resample('M').last()[['MTD '+col for col in pnl_cols]] + df = df[(df.strat.isin(strats)) & (df.custacctname=='V0NSCLMAMB')] + pnl_cols = ['bookunrealmtm', 'bookrealmtm', 'bookrealincome', 'bookunrealincome', 'totalbookpl'] + return df.groupby('invid').resample('M').last()[['mtd'+col for col in pnl_cols]] if __name__=='__main__': valuation_reports() |
