From datetime import datetime from datetime import timedelta now = datetime.now() delta = datetime(2017,10,1) - Datetime (2017,8,24,10,0) delta.days delta.seconds start = datetime(2017,10,1) + timedelta(30) pd.to_datetime(2017,8,24,10,0)'20171201')
pd.to_datetime('2017-12-01')
pd.to_datetime('2017/12/01')

pd.date_range('20171201'.'20180301',freq = 'BM') - timedelta(2, 3600*10)
pd.date_range(start = '20171201', periods = 20)
pd.date_range(end = '20171201', periods = 20)

ts.resample('M'|'A').mean()
pd.to_datetime(tj.date)
tj.set_index('date')
tj[['close'.'ds']. Plot (plots = True, figsize = (12,6))Copy the code