#Two ways to do this df[['parks', 'playgrounds', 'sports']].apply(lambda x: x.astype('category')) cols = ['parks', 'playgrounds', 'sports', 'roading']: public[cols] = public[cols].astype('category')