Categorical_Vars = (FullRaw.dtypes == 'object') & (FullRaw.columns != 'Source') dummyDf = pd.get_dummies(FullRaw.loc[:,Categorical_Vars], drop_first = True)