Date and Time Manipulation
Learn common operations that we need to perform when dealing with date data.
pandas allows us to create Series with date and time information in them. Let’s talk about dates in brief.
Date theory
Coordinated Universal Time (UTC) is the time standard at 0 degrees longitude. It has an excellent property, namely that it’s monotonically increasing. If someone lives in Salt Lake City, Utah, they follow the America/Denver timezone, which is six or seven hours offset of UTC depending on the time of the year.
In short, a timezone may contain one or more offsets (depending on whether they observe daylight savings time). There is a standardized format, ISO 8601, for representing dates. It does not include the timezone information but the option to include an offset.
Note: The public domain timezone database (also known as the Olsen database) from iana.org provides code and data regarding timezones and their history. Their documentation states: "Timezones are typically identified by continent or ocean and then by the name of the largest city within the region containing the clocks. For example, America/New_York represents most of the US Eastern Time Zone; America/Phoenix represents most of Arizona, which uses mountain time without daylight savings time (DST); America/Detroit represents most of Michigan, which uses eastern time but with different DST rules in 1975; and other entries represent smaller regions like Starke County, Indiana, which switched ...