Make a heatmap¶

Import library¶

In [26]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns 

Generate Data¶

In [27]:
df = pd.DataFrame(np.random.rand(4,3),columns=["A","B","C"] )
df.head()
Out[27]:
A B C
0 0.305377 0.364436 0.948724
1 0.100469 0.534330 0.143337
2 0.133616 0.441121 0.912186
3 0.845171 0.277859 0.830589

Plot Heatmap¶

In [29]:
sns.heatmap(df,
            cmap="viridis"
           )
plt.show()

Plot cluster map¶

In [30]:
sns.clustermap(df,
            cmap="viridis"
           )
plt.show()
In [ ]: