Perform PCA on columns of different length I have about 20-30 columns, all with different lengths. The first column has 25000 rows, the second column has 19000 rows, and it's different for all the columns.
All are the survey data with 0 (No),1(Yes), and 666 (for missing data) values. I want to perform PCA on these data. As each column is of unequal length, I am having a hard time doing PCA due to 'NaN' values for most of the columns that are shorter in length.
I don't want most of the information to be lost, so I am not willing to delete the rows of longer length columns and make every column equal in length.
Please advise me the possible solutions.
According to my understanding PCA requires that you have the column of equal length, so you either need to

shorten the longer columns (basically just skip the incomplete observations) or

fill in the gaps in the shorter columns.


If you choose the second option, you'll need to learn about the concept of imputation (see the following link for reference Missing data imputation).
Please note, that you need to get rid of the dummy values representing missing response (666s) in your data before performig PCA, because these values are arbitrary (they also could be 9999 or -1) and would have significant impact on the results.
Furthermore, it's arguable whether PCA can be applied to binary data, see e.g. discussion under related SE question.