Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Pearsonr Help
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..?

Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)