aboutsummaryrefslogtreecommitdiffstats
path: root/python/graphics.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/graphics.py')
-rw-r--r--python/graphics.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/graphics.py b/python/graphics.py
index fc9764bb..75740081 100644
--- a/python/graphics.py
+++ b/python/graphics.py
@@ -62,7 +62,7 @@ def plot_time_color_map(df, spread_shock, attr="pnl", path=".", color_map=cm.RdY
val_date = df.index[0].date()
df = df.reset_index()
- df['days'] = (df['date'] - val_date).dt.days
+ df['days'] = (df['date'].dt.date - val_date).dt.days
ascending = [True,True] if index == 'HY' else [True,False]
df.sort_values(by=['date','spread'], ascending = ascending, inplace = True)
date_range = df.days.unique()