Skip to content

Instantly share code, notes, and snippets.

@rian-dolphin
Created November 3, 2021 21:39
Show Gist options
  • Save rian-dolphin/1b7be09c3c89af92a74e000a4dd2084c to your computer and use it in GitHub Desktop.
Save rian-dolphin/1b7be09c3c89af92a74e000a4dd2084c to your computer and use it in GitHub Desktop.
df = pd.read_csv('WMT_Earnings.csv', index_col='Date')
#-- Set index to correct format
df.index = pd.to_datetime(df.index)
#-- Put the data in chronological order
df = df.iloc[::-1]
#-- Only select data up to end of 2019
df = df[:"2019"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment