Loading tutorials
resample() call depends on one fact: pandas must know which row happened when. This chapter covers how to give it that information and how to check that you did. It also covers the mistakes that most often break the later steps in this tutorial.6 min readresample() call starts with a frequency, such as "W", "MS" or "15min". That string tells pandas how wide each bin is and where the bins start. This chapter covers how those strings are built, which ones you will use most, and which ones cause mistakes.5 min readresample() between the call and the result. Once you can see the binning step, the aggregation and fill options in later chapters are easier to predict.6 min readDatetimeIndex, read frequency strings such as "D" and "W",5 min readDatetimeIndex, write frequency strings such as "2D" or "MS", and call resample(...) on a Series or DataFrame. Once rows are grouped into bins, you choose how each bin collapses into one value. That choice decides whether the result is correct.4 min readDatetimeIndex, read frequency strings such as "D" and "h", and downsample with resample().sum(). It covers how the new grid is built, what th5 min readDatetimeIndex, write a frequency string such as "D" or "W", and call resample() to downsample. It covers what happens when you go the other way, to a finer frequency, and the new rows have no data.5 min readDatetimeIndex, know what resample() returns, and have used .sum() or .mean() on a resampler. Here you will learn the two settings that decide which rows land in each bin (closed) and what timestamp each result row carries (label). Mixing these up is a5 min readDatetimeIndex, call resample() with a frequency string such as "MS", and apply an aggregation like sum() or mean(). Here you will see what pandas returns for a bin that contains no rows, why the answer differs between aggregations, and how to control it5 min readresample() on a Series with a DatetimeIndex. It also assumes you know frequency strings such as "W" and "MS". Real data often arrives with dates in an ordinary column and a default integer index. You can resample it wit4 min readDatetimeIndex, write frequency strings such as "W" and "MS", and call resample() with an aggregation. You have met resample() in the earlier chapters. Here you compare it with two methods that look similar: asfreq() and rolling().5 min readresample() builds bins (covered earlier in this tutorial) and how closed and label pick the bin side and name. Here you control where the bin grid itself starts. The origin and offset arguments decide that.5 min readresample() on a single time series. It also assumes you know how to use groupby() and what a MultiIndex is. The task here is to resample data that holds several entities at once, such as stores, sensors, or users, so that each entity gets its own bins.5 min readresample() with a frequency string and an aggregation. It also assumes you know what a DatetimeIndex is. Here you will see how bins behave when the index carries a time zone, why some days are 23 or 25 hours long, and how to avoid the usual mistakes arou5 min readDatetimeIndex.resample(): bins, aggregation, and ffill(). It also assumes you can build a Series with a datetime index. The new part is the PeriodIndex, a second kind of time index that changes how bins behave.4 min read