aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/load_globeop_report.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/load_globeop_report.py b/python/load_globeop_report.py
index 03806f12..e5b50ed7 100644
--- a/python/load_globeop_report.py
+++ b/python/load_globeop_report.py
@@ -64,9 +64,11 @@ def valuation_reports():
def read_pnl_report(f):
df = pd.read_csv(f)
- df.Strat = df.Strat.str.replace("^(SERCGMAST__){1,2}(M_|SER_)?", "", 1)
+ df.Strat = df.Strat.str.replace("^(SERCGMAST__){1,2}(M_|SER_)?", "", 1, regex=True)
df = df.replace({"Strat": {"TCDSCSH": "TCSH", "MTG_CRT_LD": "CRT_LD"}})
- df.Port = df.Port.str.replace("^(SERCGMAST__){1,2}(SERG__|SERG_)?", "", 1)
+ df.Port = df.Port.str.replace(
+ "^(SERCGMAST__){1,2}(SERG__|SERG_)?", "", 1, regex=True
+ )
df["LongShortIndicator"] = df["LongShortIndicator"].str.strip()
df.columns = df.columns.str.lower().str.replace(" ", "")
return df