In [1]:
import numpy as np 
from pandas import DataFrame
import matplotlib.pyplot as plt
%matplotlib inline

In [2]:
# create a heatmap (i.e. "colorized" data table)
indexes = ['I', 'II', 'III', 'IV', 'V']
columns = ['A', 'B', 'C', 'D']

df = DataFrame(abs(np.random.randn(5, 4)), index=indexes, columns=columns)
print(df)


            A         B         C         D
I    0.903771  0.962999  0.179340  0.338481
II   0.434929  1.311034  1.244440  1.645272
III  1.889214  1.167433  0.268880  1.406674
IV   0.829250  0.372528  1.037216  0.306052
V    1.100880  1.142810  1.465272  0.001998

In [3]:
# display the heatmap with a red color palette
plt.pcolor(df, cmap=plt.cm.Reds)
plt.yticks(np.arange(0.5, len(df.index), 1), df.index)
plt.xticks(np.arange(0.5, len(df.columns), 1), df.columns)
plt.show()