pandas convertem data em trimestre
df['quarter'] = pd.PeriodIndex(df.date, freq='Q')
date quarter
s1 2018-03-22 2018Q1
s2 2018-03-22 2018Q1
s1 2018-06-22 2018Q2
s2 2018-06-22 2018Q2
s1 2018-09-22 2018Q3
s2 2018-09-22 2018Q3
Comfortable Cardinal