i'm trying to accumulate numbers per group per year.
df = pd.DataFrame({
'group number': [1,1,1,1,3,3,3],
'year': ['2012','2013','2014','2015','2011','2012','2013'],
'trend': [0,'1','1','-1',0,'-1','1']})
so the new field that i'm trying to create will be for each group accumulating for every year.
group 1 will have :
group 3 will have group 3
thanks
Comments
Post a Comment