Make some progress towards adding apply and make some of the other functions from groupby return PRDDs rathern than Dataframes