I have a front end where my clients select a date period like date_start = 2020/01/03 date_end = 2020/03/10
I have a data frame that has 1975 lines and 4 columns, including Date, like:
Date|Tax|Values|Total
I need to get all columns in that to be in a period between date_start and date_end on Pandas Dataframe. How Can I get it?
What I tried:
Try to do it with code:
new_df= df[(df['Date'] >= date_start) & (df['Date'] <= date_end)]
But the return was wrong.
welcome.
Keep in mind you're not filtering for those dates but selecting the dates in between.
Try the following: