Examples
import numpy as np
import pandas as pd
pd.Series([2, 4, 3, 3], name='P').unique()
pd.Series([pd.Timestamp('2019-01-01') for _ in range(3)]).unique()
pd.Series([pd.Timestamp('2019-01-01', tz='US/Eastern')
for _ in range(3)]).unique()
An unordered Categorical will return categories in the order of appearance.
pd.Series(pd.Categorical(list('qppqr'))).unique()
An ordered Categorical preserves the category ordering.
pd.Series(pd.Categorical(list('qppqr'), categories=list('pqr'),
ordered=True)).unique()