We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65e4ef8 commit de01b78Copy full SHA for de01b78
lectures/polars.md
@@ -579,9 +579,9 @@ We can also plot the unemployment rate from 2006 to 2012 as follows
579
```{code-cell} ipython3
580
# Filter data for the specified date range and convert to pandas for plotting
581
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')
+ (pl.col('observation_date') >= pl.date(2006, 1, 1)) &
+ (pl.col('observation_date') <= pl.date(2012, 12, 31))
+).to_pandas().set_index('observation_date')
585
586
ax = filtered_data.plot(title='US Unemployment Rate', legend=False)
587
ax.set_xlabel('year', fontsize=12)
0 commit comments