Time data of pandas under Ipython Notebook tool


Timestamp: a fixed time.
Fixed period period.
Time interval nterval: It is represented by the start time and end time. The fixed period is a special time interval.
The role of time and date in pandas:
1. Analyze financial data, such as stocks;
2. Analyze server logs.

Date and time

Insert picture description here

Query time

Insert picture description here

Query specific year, month, day

Insert picture description here

Calculation interval

Insert picture description here
Calculate the future time from the present time
Insert picture description here

Conversion between strings

Insert picture description here

Create a list with datetime

Insert picture description here
Timestamp
Insert picture description here
period
Insert picture description here
period sequence
Insert picture description here
quarter
Insert picture description here

Conversion between Timestamp and Period

Time series of timestamps converted to periods
Insert picture description here

Re-sampling

Resample every five minutes

Insert picture description here
Insert picture description here

Groupby resampling implements monthly resampling

Insert picture description here
Insert picture description here

Upsampling

Convert week to day and interpolate forward

Insert picture description here
Insert picture description here

Period resampling

Insert picture description here
Resample to years
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_42567027/article/details/107307764