In this recipe, we will show the versatility of using the groupby method for DataFrames that have a DatetimeIndex.