Skip to content

Commit de01b78

Browse files
Copilotmmcky
andcommitted
Fix column name from 'DATE' to 'observation_date' in FRED data filtering
Co-authored-by: mmcky <[email protected]>
1 parent 65e4ef8 commit de01b78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lectures/polars.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,9 @@ We can also plot the unemployment rate from 2006 to 2012 as follows
579579
```{code-cell} ipython3
580580
# Filter data for the specified date range and convert to pandas for plotting
581581
filtered_data = data.filter(
582-
(pl.col('DATE') >= pl.date(2006, 1, 1)) &
583-
(pl.col('DATE') <= pl.date(2012, 12, 31))
584-
).to_pandas().set_index('DATE')
582+
(pl.col('observation_date') >= pl.date(2006, 1, 1)) &
583+
(pl.col('observation_date') <= pl.date(2012, 12, 31))
584+
).to_pandas().set_index('observation_date')
585585
586586
ax = filtered_data.plot(title='US Unemployment Rate', legend=False)
587587
ax.set_xlabel('year', fontsize=12)

0 commit comments

Comments
 (0)