group by column1

PHOTO EMBED

Wed Jun 23 2021 08:07:36 GMT+0000 (Coordinated Universal Time)

Saved by @CaoimhedeFrein #python

grouped_df = df.groupby("segment")

max_cust = grouped_df.customers.max()
content_copyCOPY

group by segment & then return the max customer count & the segment name