Group By and Aggregate Functions in Pandas | Python Pandas Tutorials

preview_player
Показать описание

In this series we will be walking through everything you need to know to get started in Pandas! In this video, we learn about Group By and Aggregate Functions in Pandas.

Favorite Pandas Course:
____________________________________________

SUBSCRIBE!
Do you want to become a Data Analyst? That's what this channel is all about! My goal is to help you learn everything you need in order to start your career or even switch your career into Data Analytics. Be sure to subscribe to not miss out on any content!
____________________________________________

RESOURCES:

Coursera Courses:

Udemy Courses:

*Please note I may earn a small commission for any purchase through these links - Thanks for supporting the channel!*
____________________________________________

BECOME A MEMBER -

Want to support the channel? Consider becoming a member! I do Monthly Livestreams and you get some awesome Emoji's to use in chat and comments!

____________________________________________

Websites:
📱Instagram: @Alex_The_Analyst
____________________________________________

0:00 Intro
0:15 Read in Dataset
1:20 First Group By
1.57 First Aggregation
3:08 Popular Aggregate Functions
5:38 .agg Function
7:32 Group By on Multiple Columns

*All opinions or statements in this video are my own and do not reflect the opinion of the company I work for or have ever worked for*
Рекомендации по теме
Комментарии
Автор

3:27 note that to avoid a FutureWarning (and an error later), you need to specify df.groupby('Base Flavor').mean(numeric_only = True)

pstefanics
Автор

The "I've spent years researching this" at the start killed me 😂

Kwuasimoto
Автор

Great run through of the popular aggregate functions. Really appreciate the little summary definitions you do at the beginning of your videos. Example: "Group by: groups together values in a column and displays them all on the same row", etc. As always, THANK YOU ALEX!! Happy New Year!

sj
Автор

I really like this series and many thanks to Alex for sharing such useful knowledge.

furrywarrior
Автор

For those who get error in mean,
df.groupby('Base Flavor').mean(['Flavor Rating', 'Texture Rating', 'Total Rating'])

toygar
Автор

Thanks Alex this was a great video. Short, concise and to the point !

Merrickul
Автор

Thank you very much! as always, your videos are very helpful!

theweirdfriend
Автор

love this thank you, 2 years ago and still commenting

LeonardDim
Автор

“Squiggly bracket” > “curly bracket” 😂

Also the first time I’ve seen describe() with groupby(). Makes total sense, thank you!

pancakez
Автор

Excellent. Much better than edx ibm course

ecstazyrm
Автор

Thank you, lovely useful content <3

thanhninh
Автор

Hey Alex, Hope you are doing well. First to let you know that you have been a great help for me in navigating the data analytics domain.
You once mentioned in one of your videos that cloud computing is now a necessary skills for Data analysts and that you would explain this in detail in one of your video. we are eagerly waiting for this video. Please make one when feasible.

ahmadch
Автор

What did Boris do, to be the pandas course of choice on Udemy to receive paid promotion?

moxie
Автор

dear alex, could you please add sort after group by analysis ?

ssteo
Автор

Where did you collect this data from? It looks incredibly thorough and well-organized for its size

skugga
Автор

Hey alex... thanks for the wonderful work... i have been following along your tutorials and practicing them but for some reason my mean agg function is not working... the rest of them are working just fine... what could be the reason behind that...

rabiahchaudhry
Автор

One question if I get this "AttributeError: 'DataFrame' object has no attribute 'gruopby" how can fix it?

mgsports
Автор

Dear Alex,

I'm writing to express my sincere gratitude for your video tutorial on groupby in Jupyter Notebook. It was very helpful in understanding the basics of calculating means for grouped data.

However, I noticed that the tutorial didn't explicitly address how group_by.mean() handles non-numeric data. In the current version of pandas, attempting to calculate the mean of a column with non-numeric values will raise a TypeError.

I found solution that by passing numeric_only = True in mean () the issue is resolved.

I would be grateful if you could consider updating the video to include a note to pass numeric_only = True in mean()

Thank you again for your excellent tutorials ❤❤

GhulamHussainKhuhro
Автор

How can i save grouped dataframe to csv but i also need to save index as column values

dimitrijemarinkovic
Автор

I need help anytime I try to move from the mean part of video on my laptop all I get is an error. However everything else works. Like sum, count, max, min. Does anyone have any tips for me please and thank you ?

At the bottom of my error says “ could not convert chocolaterocky roadchocolate fudge brownie to numeric

sirrobotoftheinternet