+ 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.
3 Respostas
+ 3
Can you share your code here ?
+ 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
+ 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