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


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020