Update demo.py with change from pd.Factor to pd.Categorical 

Update is needed from 'pd.Factor' attribute to 'pd.Categorical' since its how this function is called in the new version of Pandas.
Source on SO: http://stackoverflow.com/questions/21689423/pandas-attribute-error-no-attribute-factor-found