Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for emisora in emisoras:
- url = 'http://bit.ly/oncedos-{}'.format(emisora)
- if emisora == 'ipc':
- df = pd.read_csv(url, index_col = 0, parse_dates = True,
- usecols = ['Date', 'Close'])
- df.rename(columns = {'Close': 'PX_LAST'}, inplace = True)
- else:
- df = pd.read_csv(url, skiprows = 6, index_col = 0,
- parse_dates = True, dayfirst = True,
- usecols = ['Date', 'PX_LAST'])
- df.sort_index(inplace = True)
- precios_cierre = precios_cierre.join(df['PX_LAST'])
- precios_cierre.rename(columns = {'PX_LAST':emisora}, inplace = True)
- del df, url
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement