Transform

PHOTO EMBED

Tue Feb 08 2022 03:51:18 GMT+0000 (Coordinated Universal Time)

Saved by @jmbenedetto #python

df["User_Mean"] = df.groupby('User_ID')["Purchase"].transform('mean')
content_copyCOPY