I have a data frame where one column is categorical strings and the next one is the values corresponding to it:
df = pd.DataFrame(list(([\'a\', \'b\', \'c\', \'bu