I have a Pandas DataFrame with a \'date\' column. Now I need to filter out all rows in the DataFrame that have dates outside of the next two months. Essentially, I only need
If you have already converted the string to a date format using pd.to_datetime you can just use:
df = df[(df['Date']> "2018-01-01") & (df['Date']< "2019-07-01")]