How to implement a rolling window calculation on time series data in Pandas?
Instruction: Explain the process of setting up and applying a rolling window function to a time series dataset.
Context: This question assesses the candidate's ability to manipulate time series data using Pandas, specifically focusing on the implementation of rolling window calculations for data analysis.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
A time-based rolling window uses elapsed time, while an integer window counts rows. Sort timestamps and decide how duplicates, missing observations and boundaries should behave.
```python import pandas as pd...