Pandas: Counting unique values in a dataframe,pd.value_counts(d.values.ravel())