Add inline example for 'Basic grouping with apply'

Add inline example for 'Basic grouping with apply' under 'Grouping' section. Following the code example linked (from stackoverflow).