replace nan values in  column 'value' with the mean of data in column 'group' of dataframe `df`,df[['value']].fillna(df.groupby('group').transform('mean'))