Skip to content

Commit 587a6f5

Browse files
committed
Small fixes
1 parent f569062 commit 587a6f5

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

content/python_files/feature_engineering.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -247,18 +247,6 @@ def load_electricity_load_data(time, data_source_folder):
247247
& (pl.col("time") < pl.datetime(2021, 10, 31, hour=10, time_zone="UTC"))
248248
).skb.eval().plot.line(x="time:T", y="load_mw:Q")
249249

250-
# %% [markdown]
251-
#
252-
# Check that the number of rows matches our expectations based on
253-
# the number of hours that separate the first and the last dates. We can do
254-
# that by joining with the time range dataframe and checking that the number of
255-
# rows stays the same.
256-
257-
# %%
258-
assert (
259-
time.join(electricity, on="time", how="inner").shape[0] == time.shape[0]
260-
).skb.eval()
261-
262250
# %% [markdown]
263251
#
264252
# ## Lagged features
@@ -363,7 +351,7 @@ def iqr(col, *, window_size: int):
363351
& (pl.col("time") < pl.datetime(2021, 12, 31, time_zone="UTC"))
364352
).skb.eval()
365353
).transform_fold(
366-
[f"weather_temperature_2m_{city_name}" for city_name in city_names],
354+
[f"weather_temperature_2m_{city_name}" for city_name in city_names.skb.eval()],
367355
).mark_line(
368356
tooltip=True
369357
).encode(

0 commit comments

Comments
 (0)