First i want to tell you that i'm trying to create a model in the right steps, which needs data exploration, data preprocessing (AFTER splitting the data into train/test), etc. For the part of data exploration i want to plot the data for visualizing the correlation,distribution, etc. I don't know when i supposed to do this so i decided to plot all the things i need BEFORE splitting the data into train/test. One of the plot is the correlation with seaborn heatmap, my data contains numerical and categorical values (which needs to be encoded to binary number), since i preprocess the data AFTER the splitting, the heatmap cannot include the categorical values since its not binaried yet. Now i'm really confused of how to tackle this issue, i still need to know the correlation between the categorical feature with the target but if i encode it BEFORE the split train/test, it will defies the proper manner that i want to follow. Anyone has solution or maybe opinion?