Modelling an interval of time with a Period

pandas formalizes the concept of an interval of time using a Period object. A Period allows you to specify durations based on frequencies such as daily, weekly, monthly, annually, quarterly, and so on, and it will provide a specific start and end Timestamp representing the specific bounded interval of time.

A Period is created using a timestamp and a frequency, where the timestamp represents the anchor used as a point of reference and the frequency is the duration of time. To demonstrate, the following creates a period representing one month and which is anchored in August 2014:

A Period has start_time ...

Get Learning pandas - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.