df.pivot_table(index=['First','Last'],columns='Group',values='Measure',fill_value=0) Out[247]: Group A B First Last Jane Doe 0 11 John Smith 2 0 Mary Johnson 1 0