When should I use a "groupby" in pandas?
The pandas "groupby" method allows you to split a DataFrame into groups, apply a function to each group independently, and then combine the results back together. This is called the "split-apply-combine" pattern, and is a powerful tool for analyzing data across different categories. In this video, I'll explain when you should use a groupby and then demonstrate its flexibility using four different examples.
SUBSCRIBE to learn data science with Python:
https://www.youtube.com/dataschool?sub_confirmation=1
JOIN the "Data School Insiders" community and receive exclusive rewards:
https://www.patreon.com/dataschool
== RESOURCES ==
GitHub repository for the series: https://github.com/justmarkham/pandas-videos
"groupby" documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.groupby.html
"agg" documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.core.groupby.DataFrameGroupBy.agg.html
"plot" documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.plot.html
== LET'S CONNECT! ==
Newsletter: https://www.dataschool.io/subscribe/
Twitter: https://twitter.com/justmarkham
Facebook: https://www.facebook.com/DataScienceSchool/
LinkedIn: https://www.linkedin.com/in/justmarkham/
Видео When should I use a "groupby" in pandas? канала Data School
SUBSCRIBE to learn data science with Python:
https://www.youtube.com/dataschool?sub_confirmation=1
JOIN the "Data School Insiders" community and receive exclusive rewards:
https://www.patreon.com/dataschool
== RESOURCES ==
GitHub repository for the series: https://github.com/justmarkham/pandas-videos
"groupby" documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.groupby.html
"agg" documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.core.groupby.DataFrameGroupBy.agg.html
"plot" documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.plot.html
== LET'S CONNECT! ==
Newsletter: https://www.dataschool.io/subscribe/
Twitter: https://twitter.com/justmarkham
Facebook: https://www.facebook.com/DataScienceSchool/
LinkedIn: https://www.linkedin.com/in/justmarkham/
Видео When should I use a "groupby" in pandas? канала Data School
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Python Pandas Tutorial (Part 8): Grouping and Aggregating - Analyzing and Exploring Your Data](https://i.ytimg.com/vi/txMdrV1Ut64/default.jpg)
![How do I apply a function to a pandas Series or DataFrame?](https://i.ytimg.com/vi/P_q0tkYqvSk/default.jpg)
![](https://i.ytimg.com/vi/3vmQGANRP1c/default.jpg)
![How do I select multiple rows and columns from a pandas DataFrame?](https://i.ytimg.com/vi/xvpNA7bC8cs/default.jpg)
![My top 25 pandas tricks](https://i.ytimg.com/vi/RlIiVeig3hc/default.jpg)
![How do I explore a pandas Series?](https://i.ytimg.com/vi/QTVTq8SPzxM/default.jpg)
![How do I use the "axis" parameter in pandas?](https://i.ytimg.com/vi/PtO3t6ynH-8/default.jpg)
![How do I apply multiple filter criteria to a pandas DataFrame?](https://i.ytimg.com/vi/YPItfQ87qjM/default.jpg)
![How do I handle missing values in pandas?](https://i.ytimg.com/vi/fCMrO_VzeL8/default.jpg)
![Python Pandas Tutorial 7. Group By (Split Apply Combine)](https://i.ytimg.com/vi/Wb2Tp35dZ-I/default.jpg)
![Level Up Python Pandas GroupBy | Five Minute Python Scripts | Subscriber Request](https://i.ytimg.com/vi/F1KYHydTetc/default.jpg)
![Data Science Best Practices with pandas (PyCon 2019)](https://i.ytimg.com/vi/dPwLlJkSHLo/default.jpg)
![How do I create dummy variables in pandas?](https://i.ytimg.com/vi/0s_1IsROgDc/default.jpg)
![How To Use apply() In Pandas (Python)](https://i.ytimg.com/vi/smPLY_5gVv4/default.jpg)
![How to use groupby() to group categories in a pandas DataFrame](https://i.ytimg.com/vi/ipoSjrN0oh0/default.jpg)
![How do I filter rows of a pandas DataFrame by column value?](https://i.ytimg.com/vi/2AFGPdNn4FM/default.jpg)
![How do I use the MultiIndex in pandas?](https://i.ytimg.com/vi/tcRGa2soc-c/default.jpg)
![Python Pandas Tutorial 10. Pivot table](https://i.ytimg.com/vi/xPPs59pn6qU/default.jpg)
![Group By - Pandas](https://i.ytimg.com/vi/4Tds_P36-W0/default.jpg)
![How do I merge DataFrames in pandas?](https://i.ytimg.com/vi/iYWKfUOtGaw/default.jpg)