Let's say that I have a pandas data frame wherein some cells I have recorded an RGB value:
import pandas as pd
df = pd.DataFrame(index=[i for i in range(0,3)], columns=[i for i in range(0,3)])
df.at[1,1] = [0,0,1] #Blue
df.at[1,2] = [1,0,0] #Red
df.at[0,0] = [0,1,0] #Green
The data frame looks like this:
0 1 2
0 [0, 1, 0] NaN NaN
1 NaN [0, 0, 1] [1, 0, 0]
2 NaN NaN NaN
Now, my question is: How can I make a plot from that, which should look like a grid of squares and where all NaN are plotted as white ?

