Loading...
「ツール」は右上に移動しました。
利用したサーバー: wtserver1
3305いいね 135,123 views回再生

How to use groupby() to group categories in a pandas DataFrame

In this video we go over how to group categories of data using the grouby() operation in pandas. We use the popular Titanic data set commonly used when learning data science. We look at how to group on a single criteria on a single column. Then we move on how to group with multiple columns, then multiple groups, multiple groups and multiple columns, and how to look at multiple groupby functions in a single command. As a bonus, I'll show you a trick on how to minimize the number of groups which can improve the interpretability of you data.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

$15 off Annual Dataquest subscription
app.dataquest.io/referral-signup/qybqz3r8/

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Merch: https://bit.ly/PythonAndDataMerch

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Did you find this video helpful? Consider subscribing for weekly tips, tricks, and tutorials.
   / @chartexplorers  

Link to Data
https://bit.ly/3kGDuKx

0:00 Intro
0:18 Data Overview
1:08 Groupby single col & function
1:55 Multiple cols grouped
2:40 Multiple grouping cols
3:20 Multiple functions flat df
3:43 Multiple functions
4:35 Quick tip

コメント