#The .pad() and the .ffill() do the exact same thing and just have different names #data.resample('W').pad().equals(data.resample('W').ffill()) -----> prints True df.resample('W').pad()
Here is what the above code is Doing:
1. Resample the data to weekly frequency, aggregating with the pad method.
2. Plot the data.
3. Show the plot.