text_plain_output_1.png image_output_1.png
from sklearn.preprocessing import StandardScaler

import matplotlib.pyplot as plt

import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

df_fifa = pd.read_csv('/kaggle/input/fifa19/data.csv')

columns_to_drop = ['Unnamed: 0', 'ID', 'Name', 'Photo', 'Nationality', 'Flag', 'Club', 'Club Logo', 'Value', 'Wage', 'Special', 'Preferred Foot', 'International Reputation', 'Weak Foot', 'Skill Moves', 'Work Rate', 'Body Type', 'Real Face', 'Position', 'Jersey Number', 'Joined', 'Loaned From', 'Contract Valid Until', 'Height', 'Weight', 'LS', 'ST', 'RS', 'LW', 'LF', 'CF', 'RF', 'RW', 'LAM', 'CAM', 'RAM', 'LM', 'LCM', 'CM', 'RCM', 'RM', 'LWB', 'LDM', 'CDM', 'RDM', 'RWB', 'LB', 'LCB', 'CB', 'RCB', 'RB', 'Release Clause']
df_fifa.drop(columns_to_drop, axis=1, inplace=True)

df_fifa = df_fifa.dropna()
x = df_fifa.drop('Overall', axis=1).values
y = df_fifa.Overall.values

x = StandardScaler().fit_transform(x)

mx_cov = np.cov(x, rowvar=False)

plt.figure(figsize=(30, 30))
sns.heatmap(mx_cov, annot=True)