data = {"marks":[1,2,3,4,5,6,7,8,9,10,11,12], "month":['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec']}
df2 = pd.DataFrame(data)
Till now I tried below but not getting as mentioned above:
for i in df2['month']:
if (i=='jan' or i=='feb' or i=='mar'):
df2['q'] = '1Q'
else:
df2['q']='other'
