How to create a name for a var in output of groupby - Python
You can use Base_Eventos.groupby(by='idPartida').count() instead.
I have some data in excel that I imported into a dataframe in Python (Base_Eventos). I need to summarize a variable (PartyID), so I use:
Base_Eventos.groupby (by = 'partyID'). Size ()
Since the result comes out with a part of the counter without a variable name. And I will need to use this count output to make a filter. How can I transform this output with a name for a newly created variable? base ex:
idPartida   count (I want to add this variable name because it comes null)
x123           67
x124           86
x135           54