Pandas: Fill missing values by mean in each group faster than transfrom,df[['value']].fillna(df.groupby('group').transform('mean'))