Filter dataframe for past 4 quarters
I have a DataFrame with start date and end date as a column. Firstly I need create a new column using End Date which consists of yearquarter (2022Q4) which I did using below code: df[‘Quarter’]=pd.PeriodIndex(d[‘End Date’],freq=’Q’) Now I want to filter data for past 4 quarters using End Date, lets say curremtly its 2023Q1, so… Read More Filter dataframe for past 4 quarters