Replacing a nulll value with a mean\0\median and Heatmap
Replacing a nulll value with a mean
df_housing["AGE"]=df_housing["AGE"].fillna(df_housing.mean())
df_housing["AGE"]
Replacing a nulll value with a "0"
df_housing["AGE"]=df_housing["AGE"].fillna(df_housing.mean())
Replacing a nulll value with a median
Correlation
Correlation is a statistical measure between -1 and +1 that indicates how closely two variables are related. A correlation of -1 or +1 means that variables are completely dependent, and they fall in a perfectly straight line. A correlation of 0 indicates that an increase in one variable gives no information whatsoever about the other variable. Visually, this would be points all over the place. Correlations usually fall somewhere in the middle.
For instance, a correlation of 0.75 represents a fairly strong relationship, whereas a correlation of 0.25 is a reasonably weak relationship. Positive correlations go up (meaning as x goes up, y goes up), and negative correlations go down.
represented by:
df_housing.corr()
lets make aheat map on correlation data
import seaborn as sns
corr=df_housing.corr()
sns.heatmap(corr,xticklabels=corr.columns.values,yticklabels=corr.columns.values,cmap='Blues')
plt.show()
Comments
Post a Comment