Python Forum
Mistake by correlation (x, y)
Thread Rating:
  • 3 Vote(s) - 3.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mistake by correlation (x, y)
#1
Hi there,

I have a problem with calculation of correlation.
I have a simple table:
meanwspdi weather_lat weather_lon
0 7.860000 40.700348 -73.887177
1 7.860000 40.700348 -73.887177
2 7.860000 40.700348 -73.887177
3 7.860000 40.700348 -73.887177
4 7.860000 40.700348 -73.887177
5 8.250000 40.700348 -73.887177

(There are much more columns than this example shows)

I want to calculate the correlation between two columns ['ENTRIESn_hourly'], ['meanprecipi']
This is my code:

import pandas as pd
abba = pd.read_csv('nyc.csv')

df = abba.correlation(['ENTRIESn_hourly'], ['meanprecipi'])

But I get an error:
AttributeError: 'DataFrame' object has no attribute 'correlation'

What is my mistake?

Thank you!
J
Reply


Messages In This Thread
Mistake by correlation (x, y) - by Jack_Sparrow - May-10-2018, 01:18 PM
RE: Mistake by correlation (x, y) - by mlieqo - May-10-2018, 02:03 PM
RE: Mistake by correlation (x, y) - by volcano63 - May-10-2018, 02:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Different Correlation Coefficents with different Time Ranges giaco__mar 0 859 Sep-28-2022, 02:03 PM
Last Post: giaco__mar
  Cross-correlation between 2 planes in a 3D array Mark3232 2 4,616 May-16-2019, 09:46 AM
Last Post: Mark3232
  do you know a code that will print all correlation values using numpty and panda? crispybluewaffle88 1 2,460 Mar-06-2019, 12:45 PM
Last Post: scidam
  Help with correlation coefficient mattjb84 7 4,946 Jun-29-2018, 09:56 PM
Last Post: Larz60+
  Pandas dataframe: sum of exponentially weighted correlation matrices per row vvvcvvcv 1 3,283 May-29-2018, 01:09 AM
Last Post: scidam

Forum Jump:

User Panel Messages

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