Created
June 17, 2020 05:47
-
-
Save Jargon4072/fd5d8b27c292ddf6679216098559d2c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import seaborn as sns | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
df1=pd.read_csv("./x01.csv") | |
df1.columns=["Index","Brain_weight","Body_weight"] | |
corr_data = df1.corr() #we are using pandas library's corr() function to find correlation. | |
print(corr_data) | |
plt.figure(figsize=(9,5)) | |
sns.set_style('ticks') | |
sns.heatmap(corr_data, annot=True) | |
plt.title('Correlation of variables in df1 Data set') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment