Skip to content

Instantly share code, notes, and snippets.

@davidzhaodz
Created January 9, 2021 11:04
Show Gist options
  • Save davidzhaodz/2ddb4d3217836294aa64646b4661dfd5 to your computer and use it in GitHub Desktop.
Save davidzhaodz/2ddb4d3217836294aa64646b4661dfd5 to your computer and use it in GitHub Desktop.
#download the data into your google drive to use the following code
infp=PurePath('/content/drive/MyDrive/BTC_1m_2018_dollar.parq')
#import data and set timestamps as index
data = pd.read_parquet(infp)
data['timestamp']= pd.to_datetime((data['timestamp']).astype(float), unit='ms')
data = data.set_index('timestamp')
print(data.info())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment