<human>:  Python pandas - grouping by and summarizing on a field
<bot>: Here is some code to convert dataframe `df` into a pivot table using column 'order' as index and values of column 'sample' as columns

df.pivot(index='order', columns='sample')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.