Skip to content

Instantly share code, notes, and snippets.

@marcosan93
Created September 26, 2019 21:15
Show Gist options
  • Select an option

  • Save marcosan93/f73442b1bb059c1594cf1fa3f6266a5f to your computer and use it in GitHub Desktop.

Select an option

Save marcosan93/f73442b1bb059c1594cf1fa3f6266a5f to your computer and use it in GitHub Desktop.
# Reading in the data
bc = pd.read_csv('BTC-USD.csv')
# Converting to datetime
bc['Date'] = pd.to_datetime(bc.Date)
# Setting the index as the dates
bc.set_index('Date', inplace=True)
# Selecting only the dates from 2017-01-01 onwards
bc = bc[['Close']].loc['2017-01-01':]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment