How to efficiently get the correlation matrix (with p-values) of a data frame with NaN values? This question turned out to be a good solution.