Created
August 21, 2020 16:32
-
-
Save evanaze/afec0e2f547222cad6bb67326574ed8b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load the data into a DataFrame and rename the columns | |
data = pd.DataFrame(response["data"]).rename({0: "date", 1: "volatility", 2: "sharpe"}, axis=1) | |
# turn the date column into datetime type | |
data["date"] = pd.to_datetime(data["date"]) | |
# set the date as the index | |
data.set_index("date", inplace=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment