import pandas as pd
time = pd.datetime(2019,7,7,6,0)
display(time)
datetime.datetime(2019, 7, 7, 6, 0)
import pandas as pd
time = pd.datetime(2019,7,7,6,0)
time = time + pd.Timedelta(minutes=10)
display(time)
datetime.datetime(2019, 7, 7, 6, 10)
# 输出6:00~7:00,间隔20分钟import pandas as pd
time_list =[]
time = pd.datetime(2019,7,7,6,0)while(time <= pd.datetime(2019,7,7,7,0)):
time_list.append(time)
time = time + pd.Timedelta(minutes=20)
display(time_list)