Home > Net >  How to map color names with their HEX to make a conditionnal formating
How to map color names with their HEX to make a conditionnal formating

Time:11-02

I have the dataframe below:

import pandas as pd

df = pd.DataFrame({'ID': ['ID001', 'ID002', 'ID003', 'ID004', 'ID005', 'ID006'],
                   'Color': ['Red', 'Green', 'Blue', 'Green', 'Yellow', 'Purple']})

      ID   Color
0  ID001     Red
1  ID002   Green
2  ID003    Blue
3  ID004   Green
4  ID005  Yellow
5  ID006  Purple

And I'm trying to get this kind of Excel spreadsheet output :

enter image description here

By using enter image description here

  • Related