+ 1

How to print the complete correlation matrix

Hi to all, When printing my correlation matrix in editor results window it only shows first 2 columns ... last 2 columns. Need to check all matrix. Have even tried to write it to a file, but it shows up exactly the same way in the file. Sorry for this basic question, but how can I force it to print/ write to a file the complete matrix? Thank you. Filipe Santos.

11th Aug 2020, 11:54 AM
Filipe Santos
3 Réponses
+ 3
Can you share your code here ?
11th Aug 2020, 11:57 AM
Arsenic
Arsenic - avatar
+ 1
The .corr() method should correlate your dataframe, but if you're doing it in Sololearn, that data is truncated, it only shows the first few and last few. However, if you do it in Jupyter Notebook, you should have a better result. Also, my advice would be to use some Seaborn visualizations... ### import seaborn as sns sns.heatmap(df.corr()) ### This help visualize the correlation of columns. i have some notebooks on Kaggle, please take a look. https://www.kaggle.com/n3v375/titanic-eda Hope this helps
11th Aug 2020, 12:47 PM
Steven M
Steven M - avatar
+ 1
Thank you for your answers. Have just googled it and found this; pd.set_option('display.max_rows', 500) pd.set_option('display.max_columns', 500) It did the trick. Thank you anyways. FS
11th Aug 2020, 1:00 PM
Filipe Santos