时间序列(Timeseries)

Between times

Using indexer between time

Constructing a datetime range that excludes weekends and includes only certain times

Vectorized Lookup

Aggregation and plotting time series

Turn a matrix with hours in columns and days in rows into a continuous row sequence in the form of a time series. How to rearrange a Python pandas DataFrame?

Dealing with duplicates when reindexing a timeseries to a specified frequency

Calculate the first day of the month for each entry in a DatetimeIndex

  1. In [147]: dates = pd.date_range('2000-01-01', periods=5)
  2. In [148]: dates.to_period(freq='M').to_timestamp()
  3. Out[148]:
  4. DatetimeIndex(['2000-01-01', '2000-01-01', '2000-01-01', '2000-01-01',
  5. '2000-01-01'],
  6. dtype='datetime64[ns]', freq=None)

Resampling

The Resample docs.

Using Grouper instead of TimeGrouper for time grouping of values

Time grouping with some missing values

Valid frequency arguments to Grouper

Grouping using a MultiIndex

Using TimeGrouper and another grouping to create subgroups, then apply a custom function

Resampling with custom periods

Resample intraday frame without adding new days

Resample minute data

Resample with groupby