that is my date I want to choose
myDates=['2021-02-24', '2021-02-26','2021-02-27', '2021-03-06', '2021-04-4', '2021-04-05', '2021-04-06',
'2021-04-07', '2021-04-08','2021-04-13', '2021-04-14', '2021-04-15', '2021-04-16','2021-04-17',
'2021-04-22','2021-04-23', '2021-04-28', '2021-04-29', '2021-04-30', '2021-05-02', '2021-05-03',
'2021-05-04' ,'2021-05-05', '2021-05-06', '2021-05-08']
change them to date time
myDates=pd.to_datetime(myDates)
and trying to use .loc
function
df1=df.loc[myDates]
I get that message
'Passing list-likes to .loc or [] with any missing labels is no longer supported, see https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike'