This question already has an answer here:
I have a dataset with both continuous and categorical features. I want to reduce the dimensionality, but cannot apply PCA directly on the dataset because of the categorical features.
One solution I thought of was to run PCA exclusively on the continuous features, reduce the dimensions there, and then add the categorical features as they are to the reduced table with the continuous features.
I have not seen this method anywhere, but it makes sense to me, so I was wondering if it's OK.