Plot correlation matrix using pandas

前端 未结 12 730
渐次进展
渐次进展 2020-11-30 16:23

I have a data set with huge number of features, so analysing the correlation matrix has become very difficult. I want to plot a correlation matrix which we get using d

12条回答
  •  盖世英雄少女心
    2020-11-30 16:52

    statmodels graphics also gives a nice view of correlation matrix

    import statsmodels.api as sm
    import matplotlib.pyplot as plt
    
    corr = dataframe.corr()
    sm.graphics.plot_corr(corr, xnames=list(corr.columns))
    plt.show()
    

提交回复
热议问题