Running pairwise correlations directly on a Spark dataframe