Question: I have a issue in generating pearson and spearman correlation and generating heatmap only using numpy and scipy. when i worked on pairplot, it gave

I have a issue in generating pearson and spearman correlation and generating heatmap only using numpy and scipy. when i worked on pairplot, it gave me right result, however when i extend the same for heat map, it doesnt work. However when i use seaborn and pandas, i get the desired output. I am not sure where the mistake is? can you guide with correct commands in python
Ex: these are numpy data
columns_of_interest =[1,0,2,6,3]
x_data = x[:, columns_of_interest]
variables =['T ,'E,'C,'F','D']
when i use pandas:
i create dataframe : pd.Dataframe[x_data,columns=variables]
after that, i can find correlation values for pearson and spearman and plot heatmap
however, numpy and scipy is not working. it generates Nan Value. for the same data, why seaborn and pandas work and not numpy and scipy. do i need to do anything in the data set.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!