I have a pandas dataframe which looks like:
gene1 gene2 pvalue qvalue
TP53. FUBP1 6.381282e-09. 2.435575e-08
TP53. CIC 1.570489e-22. 7.055298e-22
IDH1. NF1 1.946551e-05. 7.116265e-05
I want a matrix as shown below:
So I to plot a matrix which has gene names as rows and columns and colours only those cells for which gene pairs are found in the pandas dataframe above. How can I achieve this in pandas.

