I have a dataframe df containing string values
a b c d
b c d a
I would like to produce a pdf plot based on the data in the df, with 4 cols and 2 rows, where each cell in the table plot has a color depending on the value in the df, a=blue, b=red, c=yellow, d=green.
Thanks in advance!

plt.tableor a subplot grid? I think you would benefit from describing much more in detail the desired output and also what other resources have not helped you achieve what you want.imshowplot of the data. You will need a custom colormap with the 4 colors in it.