Pandas Groupby In A Nutshell

Oct 12 · 4 min read

I’ve tutored quite a couple of students (both regular and ad-hoc) on Pandas and data analytics, and have noticed that not many people are too familiar with the pandas groupby function.

Our DataFrame

Let’s say we know of a couple of fruit shops — A, B and C — and each shop sells different fruits at different prices, and have different quantities of fruits