data.groupby(['col',data.START_HOUR.dt.floor('30Min')]).size().reset_index() 需要先将START_HOUR 采用pd.to_datetime转为时间格式