Pearsonr Help - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: Pearsonr Help (/thread-15859.html) |
Pearsonr Help - Pmllz - Feb-03-2019 I am trying to get the p-values across an eentire data set, I want the y-value to reference the values in a column called 'Republican Relative Votes 08' and the x-value to iterate each column in the dataframs and compare it to the y value, I know I need to use a for loop for the x-value and then plug this into pearsonr(x, y) but how do I set this up? for index, row in final_republican.iterrows(): print(index, row[:]) y = (['Republican Relative Vote 08'])) pearsonr(, y) trying this but i cannot set my x value to a loop..? |