[pandas] group by 하여 counter 컬럼 추가
df = pd.DataFrame(columns=['name','age','city']) df =df.append({'name':'kim','age':1, 'city':2}, ignore_index= True) df =df.append({'name':'kim','age':1, 'city':2}, ignore_index= True) df =df.append({'name':'park','age':1, 'city':5}, ignore_index= True) df =df.append({'name':'kim','age':2, 'city':5}, ignore_index= True) df =df.append({'name':'park','age':2, 'city':2}, ignore_index= True) df =df...
2021. 6. 10.