intent: Python pandas - grouping by and summarizing on a field
rewritten_intent: convert dataframe `df` into a pivot table using column 'order' as index and values of column 'sample' as columns
snippet: df.pivot(index='order', columns='sample')