Enhancement to guess optimal/compressed datatypes for a dataframe


In many cases we read tabular data from some source modify it, and write it out to another data destination. In this transfer we have an opportunity to tighten the data representation a bit, for example by changing dtypes or using categoricals.

Often people do this by hand. It might be nice for us to do some of this work for them based on a single pass through the data. This might involve finding min/max of all integer columns, the approximate number of unique elements of all object dtype and integer columns, etc. and returning an appropriate dtype dict that we could optionally pass into an asdtype method.

Originially inspired by [issue from dask.
](https://github.com/dask/dask/issues/1744)

#### A small, complete example of the issue

```python
df = pd.DataFrame({'x': [1, 2, 3], 'y': ['a', 'b', 'c']})

```

#### Expected Output
In [5]: df.dtypes
Out[5]: 
x     int64
y    object
dtype: object


ln [6]: compressed_dtypes(df)
x     uint8
y    object
dtype: object

