My DataFrame looks something like this
d1 = pd.DataFrame({"Country":['xx','xx','xy','xz','xz'],
"year":['y1','y2','y1','y1','y2'],
"population":[100,200,120,140,190]})
What would be the best way to highlight all the distinct countries in a particular column in different colors? That would mean, the three distinct countries in the "country" column ("xx","xy","xz") needs to be highlighted in different colors each.
EDIT : These values are generated dynamically and can be different each time. So I am guessing hard coding the colors based on the values is not an option