Skip to content

Instantly share code, notes, and snippets.

@julian-west
Created September 7, 2019 16:53
Show Gist options
  • Save julian-west/c8b29048202ee66f1130a4d52292aea5 to your computer and use it in GitHub Desktop.
Save julian-west/c8b29048202ee66f1130a4d52292aea5 to your computer and use it in GitHub Desktop.
aliases = pd.read_csv("etf_names.csv",usecols=['Code','ETF Alias'])
#example aliases
display(aliases)
#convert to dictionary
aliases = dict(zip(aliases['Code'],aliases['ETF Alias']))
#rename columns from ETF codes to aliases
raw_asset_prices_df = raw_asset_prices_df.rename(columns=aliases)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment