bagaimana mendapatkan tanggal seperempat tahun di panda
df['quarter'] = df['date'].dt.quarter
Nice Newt
df['quarter'] = df['date'].dt.quarter
for m in range(1, 13):
print (m-1)//3 + 1,
print
import datetime as dt
import pandas as pd
quarter = pd.Timestamp(dt.date(2016, 2, 29)).quarter
assert quarter == 1