# Convert our label (democrat vs republican) to numeric values labels = votes[label_col].cat.codes labels_Train = Votes_Train[label_col].cat.codes # Look at the mapping for the first 5 values list(zip(votes[label_col][:5], labels[:5]))