#Upsample and replace missing values with mean value data = data.resample('D').asfreq() data.fillna(data.mean())