We have two Excel files with two columns. We read the files into two pandas dataframes and plot
for each of them an estimate of the joint distribution of the corresponding two columns. The joint distribution is calcalutated by scipy.stats.gaussian_kdefunction.

defkde_scipy(vals1,vals2,(a,b),(c,d),N):#vals1, vals2 are the values of two variables (columns)#(a,b) interval for vals1; usually larger than (np.min(vals1), np.max(vals1))#(c,d) -"- vals2 x=np.linspace(a,b,N)y=np.linspace(c,d,N)X,Y=np.meshgrid(x,y)positions=np.vstack([Y.ravel(),X.ravel()])values=np.vstack([vals1,vals2])kernel=st.gaussian_kde(values)Z=np.reshape(kernel(positions).T,X.shape)return[x,y,Z]