破案了家人们,最后一行改为print(data.groupby(['result', 'year-month-day']).size()即可,按照分组字段聚合输出和用例答案一样