diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/markit/import_quotes.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/markit/import_quotes.py b/python/markit/import_quotes.py index 568252ec..e21acb8e 100644 --- a/python/markit/import_quotes.py +++ b/python/markit/import_quotes.py @@ -227,8 +227,10 @@ def insert_index(engine, workdate=None): # data = data.groupby(['index', 'series', 'tenor', 'date'], as_index=False).last() data["source"] = "MKIT" place_holders = ",".join(["%s"] * len(ext_cols)) - sql_str = (f"INSERT INTO index_quotes_pre({','.join(ext_cols)}) " - f"VALUES({place_holders}) ON CONFLICT DO NOTHING") + sql_str = ( + f"INSERT INTO index_quotes_pre({','.join(ext_cols)}) " + f"VALUES({place_holders}) ON CONFLICT DO NOTHING" + ) engine.execute(sql_str, list(data[ext_cols].itertuples(index=False))) |
