how to calculate correlation wiht pandas code example Example: Pearson correlation coefficient between two columns table.corr(method='pearson')