This should be straightforward, but the closest thing I\'ve found is this post: pandas: Filling missing values within a group, and I still can\'t solve my problem....
df.fillna(df.groupby(['name'], as_index=False).mean(), inplace=True)