在pandas.fillna中,Method to use forfilling holes in reindexed Series pad / ffill: propagate last valid observation forward to next validbackfill / bfill: use NEX
fill操作,并使用一个order。我想先进行线性插值,然后向前填充,然后向后填充。我目前有: f_2_impute = [x for x in cl_data.columns if cl_data[x].dtypes != 'O' and 'total' not in x and 'year' not in x]
return x.ffill().bfill</em
因此,我尝试使用上下两行的平均值来填充缺失的数据行。我对编程比较陌生,所以我为任何不简洁的代码道歉。 x = float(round((a + b)/2,c))
def fill_in_singleneed to do this because the rows are stored as their excel ro