Skip to content
RED SAG Skills
mediumStudy question · answer published in Pandas interview questions, so no pointspandas

groupby with transform

What does this pandas code produce?

df["city_avg"] = df.groupby("city")["sales"].transform("mean")
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions