Filtering for a specific datetime
Continuing with the London bike-sharing data, your manager wants to know the exact demand at a specific moment. Find the rental count at noon on the first day of the dataset to see how busy the lunch hour was.
polars is loaded as pl. The DataFrame bikes is available with the time column as a Datetime. The dataset starts on July 1st, 2016.
本练习是课程的一部分
Data Transformation with Polars
练习说明
- Filter
bikesto find the row wheretimeequals noon on July 1st, 2016.
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Filter for noon on July 1st, 2016
bikes.filter(
pl.col("time") == pl.____(year=____, month=____, day=____, hour=____)
)