📅  最后修改于: 2022-03-11 14:45:52.214000             🧑  作者: Mango
#check if DatetimeIndex
print (df_temp.index)
#if necessary convert column to index
df_temp.set_index('date',inplace=True)
#if necessary convert to datetimes
df_temp.index= pd.to_datetime(df_temp.index)
loc = df_temp.index.get_loc('2015-08-17')