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:
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 8
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.08
Dive Deeper into Grouping Data
Swipe to show menu
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:
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 8