• 2022-06-26
    print(frame['height'].resample('M', kind='period').mean())写成分组的方法中,错误的是:
    A: print(frame['height'].groupby(frame.index.dt.month).mean())
    B: print(frame['height'].groupby(frame.index.month).mean())
    C: print(frame['height'].groupby(frame.index.to_period(freq='M')).mean())
    D: print(frame.groupby(frame.index.to_period(freq='M'))['height'].mean())