Reshape pandas dataframe from rows to columns,df2.groupby('Name').apply(tgrp).unstack()