Home:ALL Converter>Issues with getting Pandas correlation

Issues with getting Pandas correlation

Ask Time:2020-06-11T01:31:27         Author:STEIN

Json Formatter

I have this code:

data = pd.read_csv("out.csv")
df=data[['created_at','ticker','close']]
print(df)
print(df.corr())

out.csv looks like this:

created_at,ticker,adj_close,close,high,low,open,volume
2020-06-02 09:30:00-04:00,A,90.33000183105469,90.33000183105469,90.41000366210938,89.94999694824219,90.0,45326.0
2020-06-02 09:31:00-04:00,A,90.2300033569336,90.2300033569336,90.2300033569336,90.22000122070312,90.22000122070312,709.0
2020-06-08 15:56:00-04:00,ZYXI,22.899900436401367,22.899900436401367,22.959999084472656,22.829999923706055,22.959999084472656,5304.0
2020-06-08 15:57:00-04:00,ZYXI,22.920000076293945,22.920000076293945,22.950000762939453,22.889999389648438,22.899999618530273,5317.0
2020-06-08 15:58:00-04:00,ZYXI,22.860000610351562,22.860000610351562,22.93000030517578,22.860000610351562,22.90999984741211,10357.0

I want to see a correlation matrix between tickers using the close price over time which is why I have included the created_at column. However, when I do print(df.corr) I only see the result below not sure why

       close
close    1.0

Author:STEIN,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/62309625/issues-with-getting-pandas-correlation
yy