Here I have a dataframe named all_data. It has a column named 'Order Date', which is of the format datetime. I want to create a new dataframe named 'aug4', which contains all the rows from the 'all_data' dataframe having the date August 4 (year is 2019 for all entries). How do I go about doing the same?
I tried doing
aug4 = all_data.loc[all_data['Order Date'].year == 2019 & all_data['Order Date'].month == 8 & all_data['Order Date'].day == 4]
But it does not work.
Please suggest a solution.
