max_cust = df.groupby("segment").customers.transform(max)