Feature request: a simple aggregator function for error checking
I wrote a simple custom aggregator function that I have found repeatedly useful for error checking in data analysis.

This function does nothing you can't already do without it, but it's a simple way to add a sanity check to a common usecase.

The function is an aggregator function that raises an Exception if its input Series contains more than one unique value, and otherwise returns that value.

## Example usecase

If you know the value of the column 'datetime', you should logically also know the value of the column 'date'. Therefore, aggregating over 'datetime' should imply that you also know the 'date'. Situations like these appear often during data analysis, when you want to aggregate by a field A while keeping a field B that was derived from A.

These three statements result in the same dataframe, but the third version, which uses my custom aggregator the_value(), raises an exception if there are any rows that have the same datetime but not the same date. The first two potions are what people commonly do instead, and they are not able to detect this error:

```python
df.groupby(['datetime', 'date']).agg({'a': 'sum'})
df.groupby(['datetime']).agg({'a': 'sum', 'date':'first'})
df.groupby(['datetime']).agg({'a': 'sum', 'date': utilities.the_value})
```

## A simple implementation

```python
def the_value(series):
   c = series.nunique()
   if c > 1:
       raise ValueError("This field has more than one value after aggregation!")
   return series.iloc[0]
```

## Feature request

I request adding a named aggregator function that performs this operation, so that these sorts of errors can be caught more easily:

```python
df.groupby(['datetime']).agg({'a': 'sum', 'date': 'unique'})
```