Unique values in a column

import pandas as pd

Get a suitable data set and put it in a DataFrame.

from sklearn.datasets import load_boston
boston = load_boston()
df = pd.DataFrame(boston.data, columns=boston['feature_names'])

Get the unique values in a column.

array([ 0.,  1.])

See how many entries with each value.

0.0    471
1.0     35
Name: CHAS, dtype: int64

If you spot any errors please let me know on twitter.