Creating a frequency distribution table in Python
df.groupby(['balances']).count() should solve what you're looking for
I'm new to Python and Pandas, and i'm struggling to create a frequency distribution table form my df.
My dataframe is something like this:




Balances
Weight




10
7


11
15


12
30


13
20


10
15


13
20




edit: The balance numbers are its respective ID
I need the frequency of each balance used (in this example, balance 10 would be 2 and so on) the min, max and mean of the measurements results.
I was to use df.groupby(['balances']) but how can i use the results form using df.groupby to creat a new table? Is that the way?