pandas dataframe heatmap code example
Example: pandas plot heatmap
import matplotlib.pyplot as plt
import seaborn as sns
# optional: resize images from now on
plt.rcParams["figure.figsize"] = (16, 12)
# numeric_only_columns is a list of columns of the DataFrame
# containing numerical data only
# annot = True to visualize the correlation factor
sns.heatmap(df[numeric_only_columns].corr(), annot = False)
plt.show()