Uploaded August 2022 | Updated September 2026, 2 hours ago
The GroupBy function is sometimes confusing and overwhelming for people who are just starting with programming in pandas, or even for people who have been using pandas for years. In this tutorial, I will show you the ins and outs of the groupby function, how to use it, what it returns and how to deal with the groups that are created.
There is also an introduction for a little bonus function at the end that I think will be very useful for you called the pd.Grouper.
Get the code here: github.com/misraturp/Pandas-groupby-tutorial
You can find the data here: data.cityofnewyork.us/City-Government/NYC-Jobs/kpav-sd4t
Groupby documentation: pandas.pydata.org/docs/reference/api/pandas.DataFrame.groupby.html
Pandas Grouper documentation: pandas.pydata.org/docs/reference/api/pandas.Grouper.html
π Keep in touch?
==========================
π₯ Twitter - twitter.com/misraturp
π LinkedIn - linkedin.com/in/misraturp
πΉ YouTube - youtube.com/@misraturp
π Website - misraturp.com
Courses & resources
============================
π Fundamentals of Deep Learning in 25 pages
misraturp.gumroad.com/l/fdl
π€ Deep Learning 101 with Python and Keras (FREE)
youtube.com/playlist?list=PLM8lYG2MzHmQn55ii0duXdO9QSoDF5myF
πββοΈ Data Science Kick-starter mini-course (FREE)
misraturp.gumroad.com/l/kick-starter
πΌ Pandas cheat sheet (FREE)
misraturp.gumroad.com/l/pandascs
π NNs hyperparameters cheat sheet (FREE)
misraturp.gumroad.com/l/hcs
The GroupBy function is sometimes confusing and overwhelming for people who are just starting with programming in pandas, or even for people who have been using pandas for years. In this tutorial, I will show you the ins and outs of the groupby function, how to use it, what it returns and how to deal with the groups that are created.
There is also an introduction for a little bonus function at the end that I think will be very useful for you called the pd.Grouper.
Get the code here: github.com/misraturp/Pandas-groupby-tutorial
You can find the data here: data.cityofnewyork.us/City-Government/NYC-Jobs/kpav-sd4t
Groupby documentation: pandas.pydata.org/docs/reference/api/pandas.DataFrame.groupby.html
Pandas Grouper documentation: pandas.pydata.org/docs/reference/api/pandas.Grouper.html
π Keep in touch?
==========================
π₯ Twitter - twitter.com/misraturp
π LinkedIn - linkedin.com/in/misraturp
πΉ YouTube - youtube.com/@misraturp
π Website - misraturp.com
Courses & resources
============================
π Fundamentals of Deep Learning in 25 pages
misraturp.gumroad.com/l/fdl
π€ Deep Learning 101 with Python and Keras (FREE)
youtube.com/playlist?list=PLM8lYG2MzHmQn55ii0duXdO9QSoDF5myF
πββοΈ Data Science Kick-starter mini-course (FREE)
misraturp.gumroad.com/l/kick-starter
πΌ Pandas cheat sheet (FREE)
misraturp.gumroad.com/l/pandascs
π NNs hyperparameters cheat sheet (FREE)
misraturp.gumroad.com/l/hcs










