将dataframe里的格式进行处理,如下列图一的格式转化为图二格式
(一)
(二)
代码
df_temp['Date'] = pd.to_datetime(df_temp['Date']).dt.strftime('%Y%m%d')
time_list = df_temp['Date']
or
df_temp['Date'] = pd.to_datetime(df_temp['Date'])
time_list = df_temp['Date'].apply(lambda x : x.strftime('%Y%m%d'))