Python Pandas Tutorial (Part 8): Grouping and Aggregating - Analyzing and Exploring Your Data

preview_player
Показать описание
In this video, we will be learning how to group and aggregate our data.

In this Python Programming video, we will be learning how to group and aggregate our data. This will allow us to explore our data in ways we have not yet done in this series. We will be able to answer questions such as: "What is the most popular social media site for each country?" We will be using the groupby method, and also some aggregate functions such as mean, median, value_counts, etc. Let's get started...

Video Timestamps:
Aggregate Column - 2:00
Aggregate DataFrame - 3:55
Value Counts - 7:51
Grouping - 12:30
Multiple Aggregates on Group - 26:00
People Who Know Python By Country - 27:20
Practice Question - 34:20
Concat Series - 37:27

The code for this video can be found at:

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:

#Python #Pandas
Рекомендации по теме
Комментарии
Автор

I hope everyone had a great week! We've got a long video this week, but we go over a lot of important topics about how to analyze data in Pandas. We will learn how to answer very interesting questions such as "What is the most popular social media site by country?". I put timestamps together for this video so that you all can skip around if you need to go back and watch a specific section. Here are those timestamps:
Aggregate Column - 2:00
Aggregate DataFrame - 3:55
Value Counts - 7:51
Grouping - 12:30
Multiple Aggregates on Group - 26:00
People Who Know Python By Country - 27:20
Practice Question - 34:20
Concat Series - 37:27

Have a great weekend everybody!

coreyms
Автор

3:10 median function
5:00 describe function
7:20 count()
8:05 value_counts()
12:51 grouping the data
14:39 groupby() function
16:07 get_group(), grabbing a specific group by name
17:30 doing same by using the filters
18:40 using value_counts on filters
20:20 value_counts() for groups
21:49 using loc to find for one country
23:40 percentage by using normalize
25:00 median by country group
26:13 agg function for multiple functions
27:30 using filtering to get python users by country
30:20 error on using same approach for groups
31:40 apply method to run that on group
35:40 finding the percentage of people using python in each country(group)
37:40 using concat for combining series in a dataframe
45:30 adding percentage column

anubhavtomar
Автор

I love the fact that there are no ads interrupting in the middle. So thoughtful. ❤️

parthrawri
Автор

Yes please, do a video on the topic of MULTIPLE INDEXING!!

kylebeckhorn
Автор

Let's all admit that this dude is a hard working man and his work is just a wow!
I've been following him for quite some time now and I am always impressed by how thoughtful, tactical and clear his explanation is in every tutorial he makes.

Hat off to you, dude!

pewolo
Автор

I'd like to share my solution to the practice question:

lambda x: / len(x) * 100 )

As you can see it's just as symple as adding " / len(x) * 100 " in the lambda function, where len(x) is the total number of users for each country.

felipegomez
Автор

I'd like to share my solution to the practice question.


ctr_knows_python = x: x.str.contains('Python',
know', True:'I know'}, inplace=True)
ctr_knows_python


Hope this helps too!

jongyoonsohn
Автор

numeric_columns =

print(medians)
# this is a way of getting the medians of numerical values as I use df.median(), it gave me value error that says could not convert string to float"I am not a student who is learning to code" thanks for great work. I learn more from you than from my professors. Thank you so much for great efforts!😎

zhenpan
Автор

Best video in the series loving them and normally can’t wait for the next.

Davidkiania
Автор

This has to be one of the best videos on youtube about Pandas, thank you so much. Greetings from Perú.

jorgetiz
Автор

I love how you are just using the same data throughout the whole series. Thank you so much, Corey!

milrione
Автор

I just discover that your way of teaching is to tell not only how to do it but why this is how to do it. thumb up!!

jiangxu
Автор

The level of my programming in Python has been substantially improved since I have started watching your great videos. Many thanks, Corey. Would you please prepare some videos regarding the networkx module as well?

merajajam
Автор

one of the best thing that happened to me when I woke up (I am on the opposite side of the world to Corey Schafer) is finding that Corey just upload another Pandas tutorial video, thank you !

YeekyYeeky
Автор

Working on a project evaluating an employee survey and this is just what the doctor ordered. Thanks! One of the best channels in YouTube for data analysis hands down

walternyc
Автор

hey if ur df.median() doesn't work and ur getting typeerror and valueerror u can do df.median(numeric_only=True)

prakhararora
Автор

Hey Corey! Thanks a million for the Pandas Series. As always, very intuitive and easy to follow.

Now that you've taught Matplotlib and Pandas, would love to see a new Numpy series in order to complete the Data Science trinity. Please consider adding a Numpy Series.

antonyjohne
Автор

Im browsing thru some of the videos to brush up on Python, and this is the first python video that didnt get me bored. Concise and brillliant. Love your videos! keep up the good work :)

Blueshockful
Автор

Thanks for doing this video in a detailed way, like you always do. Just under an hour is a good length for a video like this. Thanks!

bobchannell
Автор

Thank you so much for this video. I learnt way more from this than the many hours I spent sitting in class listening to a teacher who just wanted to end the lesson early or have long lunch breaks. This is really precious. And thanks for the reassurance that if I find this difficult, there's nothing wrong with me LOL.

brewtalxxx
join shbcf.ru