image_output_1.png
import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

data = pd.read_csv('../input/world-happiness/2019.csv')

correlation_matrix_data = data.corr()

fig, ax = plt.subplots(figsize=(6, 6))
cp = ax.matshow(correlation_matrix_data)
ax.set_title('Correlation Matrix Plot')
for (i, j), z in np.ndenumerate(correlation_matrix_data):
    ax.text(j, i, '{:0.2f}'.format(z), ha='center', va='center')
fig.colorbar(cp, ax=ax, fraction=0.046, pad=0.04)