#step1 先把不要的列删掉 del df['gid'],df['WS_60'],df['WD_60']
#step2 使用前后向填充覆盖NAN df = df.fillna(method='ffill') df = df.fillna(method='bfill')