Loading tutorials
rolling(window).mean() works. The previous chapter showed that a fixed-size rolling window returns NaN for the first rows. Here you will learn why that happens, how to change it with min_periods, and6 min readDatetimeIndex and that you know the basics of rolling(window) and min_periods. Both options here change which rows each window contains. They don't change the aggregation. If you pick the wrong alignment, the numbers still look plausible, and 6 min readDatetimeIndex, and that you know the fixed-size rolling(window) call from earlier chapters, including min_periods and NaN at the edges. You should also be comfortable with sum, mean and count.6 min readrolling(window).mean() from the earlier chapters, and you are comfortable with groupby. It covers how an expanding window works, how it differs from the cumulative methods, and the mistakes people make with it.5 min readgroupby, a DatetimeIndex, and rolling(window) with min_periods, as covered in earlier chapters.5 min readrolling(window), know what min_periods does, and have used groupby and a DatetimeIndex. It covers one problem: a rolling feature that accidentally includes information the model would not have had at prediction time. The fix is usually 6 min readmean(), sum() and std() cover most needs. Sometimes the statistic you want has no built-in method, such as a mean absolute deviation, a percentile rank of the latest value, or a domain-specific score. For those cases pandas offers rolling().apply(), which runs5 min readrolling(window).mean(), how min_periods handles leading NaN values, and how expanding() accumulates from the first row. You should also be comfortable reading a Series printed in the console.6 min readrolling, expanding and ewm methods from the earlier chapters, can use a DatetimeIndex, and have run groupby in pandas. Here you learn which window operations are cheap, which are expensive, and how to measure the difference.7 min read