Jul-06-2019, 01:10 AM
Your code should be something like this:
data_pd.fillna(data_pd.groupby([data_pd.Dateobs.dt.year, df.Dateobs.dt.month]).transform('mean'), inplace=True)