I have a dataset containing a categorical variable and multiple continuous variables. The categorical variables are coded as discrete integers, whereas the continuous variables are just a range of floats. I believe that the variance in my dataset can be almost entirely described by the single categorical variable and one of the many continuous variables. To justify this, I would be interested in using PCA, but I'm not sure the best approach to use when I am considering categorical data. Any suggestions?
I'm not aware of any the dimensionality reduction algorithms (like PCA) that can work with categorical values.
However, an approach that could help you with that is to make a one-hot encoding of your categorical variables (if the number of possible values is manageable. Otherwise, try to pick only the most frequent values and assign the rest to a single variable).
If you are using Pandas DataFrames, get_dummies can be helpful.
There are several discussions on this in the stats SE. As a starting point: https://stats.stackexchange.com/q/5774/232706