Hi guys,
I'm new to python but am using to perform correlation analysis. Do you know of a code (im using numpty and panda) that will print all correlation values? This is my code:
"corr['Southsea_urban']['Residential']" in return it gives the correlation value of the specified variable.
Does any one know of a code that will allow me to print all correlation values at once? Thankyou.
I'm new to python but am using to perform correlation analysis. Do you know of a code (im using numpty and panda) that will print all correlation values? This is my code:
import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline data = pd.read_csv('https://www.dropbox.com/s/cneg6eh0hznp8zo/atmospheric_temperature.csv?raw=1', index_col=0) corr = data.corr() fig = plt.figure(figsize=(10, 10)) ax = fig.add_subplot(111) cax = ax.matshow(corr,cmap='coolwarm', vmin=-1, vmax=1) fig.colorbar(cax) ticks = np.arange(0,len(data.columns),1) ax.set_xticks(ticks) plt.xticks(rotation=90) ax.set_yticks(ticks) ax.set_xticklabels(data.columns) ax.set_yticklabels(data.columns) plt.savefig(r'C:\Users\Austin\Desktop\atmpshperic_correlation.jpg', dpi=700) plt.show()it then produces a diagram where after I am able to type
"corr['Southsea_urban']['Residential']" in return it gives the correlation value of the specified variable.
Does any one know of a code that will allow me to print all correlation values at once? Thankyou.