I am copying data from one dataframe to the other frame. In the new dataframe I want to set the TimeStamp
column to use the dateformat 2020-05-29
But I am getting an error.
ls2_df= ls_df[(ls_df.Manager == "David H") & (ls_df.Store == 4007)]
ls2_df['TimeStamp'] = pd.to_datetime(ls2_df.TimeStamp)
Gives the following error.
A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead