diff options
Diffstat (limited to 'python/bbg_prices.py')
| -rw-r--r-- | python/bbg_prices.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/bbg_prices.py b/python/bbg_prices.py index 834aa9b1..cda4ec17 100644 --- a/python/bbg_prices.py +++ b/python/bbg_prices.py @@ -14,9 +14,10 @@ fields_update = ["LN_ISSUE_STATUS", "AMT_OUTSTANDING", "PX_LAST","LAST_UPDATE_DT "CALLED", "CALLED_DT", "PRICING_SOURCE"] # append securities to request -cusips = pd.read_sql_query("select id_bb_unique, substring(id_bb_unique from 3) as cusip from bloomberg_corp_ref " \ - "where (status is Null or status not in ('REFINANCED','RETIRED', 'REPLACED')) "\ - "and not called", engine, index_col='cusip') +cusips = pd.read_sql_query("SELECT id_bb_unique, substring(id_bb_unique from 3) AS cusip " \ + "FROM bloomberg_corp_ref " \ + "WHERE (status is Null or status NOT IN ('REFINANCED','RETIRED', 'REPLACED')) "\ + "AND not called", engine, index_col='cusip') securities = ["{0} Corp".format(cusip) for cusip in cusips.index] |
