Dive Deeper into Grouping Data
In the previous chapter, we applied the mean()
function, but I want to share with you other commonly used methods.
Function title | Implementation | Syntax |
---|---|---|
mean() | Finds the mean value of all values in column that relates to one group | DataFrame.groupby().mean() |
median() | Finds the median value of all values in column that relates to one group | DataFrame.groupby().median() |
sum() | Finds the sum of all values in column that relates to one group | DataFrame.groupby().sum() |
count() | Finds the amount of values in column that relates to one group | DataFrame.groupby().count() |
min() | Finds the minimum value of all values in column that relates to one group | DataFrame.groupby().min() |
max() | Finds the maximim value of all values in column that relates to one group | DataFrame.groupby().max() |
In the task you will work with the dataset:
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 3. Hoofdstuk 8
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Awesome!
Completion rate improved to 2.08
Dive Deeper into Grouping Data
Veeg om het menu te tonen
In the previous chapter, we applied the mean()
function, but I want to share with you other commonly used methods.
Function title | Implementation | Syntax |
---|---|---|
mean() | Finds the mean value of all values in column that relates to one group | DataFrame.groupby().mean() |
median() | Finds the median value of all values in column that relates to one group | DataFrame.groupby().median() |
sum() | Finds the sum of all values in column that relates to one group | DataFrame.groupby().sum() |
count() | Finds the amount of values in column that relates to one group | DataFrame.groupby().count() |
min() | Finds the minimum value of all values in column that relates to one group | DataFrame.groupby().min() |
max() | Finds the maximim value of all values in column that relates to one group | DataFrame.groupby().max() |
In the task you will work with the dataset:
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 3. Hoofdstuk 8