diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/markit/import_quotes.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/python/markit/import_quotes.py b/python/markit/import_quotes.py index a584be96..e0522b9a 100644 --- a/python/markit/import_quotes.py +++ b/python/markit/import_quotes.py @@ -130,15 +130,13 @@ def insert_index(engine, workdate=None): data['tenor'] = data['tenor'].apply(lambda x: x.lower()+'r') data['index'] = data['index'].apply(lambda x: name_mapping[x] if x in name_mapping else np.NaN) data = data.dropna(subset=['index']) - data.set_index('index', drop=False, inplace=True) data['closespread'] *= 100 data['modelspread'] *= 100 ## we renumbered the version for HY9, 10 and 11 data.loc[data.series.isin([9, 10, 11]) & (data.index=='HY'),'version'] -= 3 data['adjcloseprice'] = data['closeprice'] data['adjmodelprice'] = data['modelprice'] - data = data.groupby(['index', 'series', 'tenor', 'date']).last() - data.reset_index(inplace=True) + data = data.groupby(['index', 'series', 'tenor', 'date'], as_index=False).last() data[ext_cols].to_sql('index_quotes', engine, if_exists='append', index=False) def insert_tranche(engine, workdate=None): |
