1. groupby之前要sort_values 对分组计算结果(Series)转dataframe,可直接reset_index() drop参数默认False 2. contact 之后要reset_index(drop = True)