pandas calculate correlation between two columns string and integer code example Example: Pearson correlation coefficient between two columns table.corr(method='pearson')