Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update 15_processing_sequences_using_rnns_and_cnns.ipynb
fixed cell 16 df.resample bug
  • Loading branch information
AndrewDavidRatnam authored May 8, 2024
commit cd40b9b69f7785f75b2114f96714da694dc4b7c6
2 changes: 1 addition & 1 deletion 15_processing_sequences_using_rnns_and_cnns.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
],
"source": [
"period = slice(\"2001\", \"2019\")\n",
"df_monthly = df.resample('M').mean() # compute the mean for each month\n",
"df_monthly = df.iloc[:,[1,2]].resample('M').mean() # compute the mean for each month\n",
"rolling_average_12_months = df_monthly[period].rolling(window=12).mean()\n",
"\n",
"fig, ax = plt.subplots(figsize=(8, 4))\n",
Expand Down