Python Write Csv File Adding Fields Using Pandas Group By Examples