Python Write Csv File Adding Fields Using Pandas Groupby