# we also need to convert our label (democrat vs republican) to numeric values labels = votes[label_col].cat.codes # take a look at the mapping for the first 5 values like so list(zip(votes[label_col][:5], labels[:5]))