Sorting correlation matrix
Sorting correlation matrix Question: I want to convert the correlation matrix to the "pandas" table, sorted from the largest value to the smallest, as in the image. How can I do it? df = pd.DataFrame(np.random.randint(0,15,size=(20, 6)), columns=["Ply_1","Ply_2","Ply_3","Ply_4","Ply_5","Ply_6"]) df[‘date’] = pd.date_range(‘2000-1-1′, periods=20, freq=’D’) df = df.set_index([‘date’]) cor=df.corr() print(cor) Out image link here Asked By: ByRam || …