I have two pandas data frames which I have taken from only one column and set dates column as index, so now I have two Series instead. I need to find the correlation for those Series.
Here are a few rows fromdfd
:
index change
2018-12-31 -0.86
2018-12-30 0.34
2018-12-27 -0.94
2018-12-26 -1.26
2018-12-25 3.30
2018-12-24 -4.17
and from dfp
:
index change
2018-12-31 0.55
2018-12-30 0.81
2018-12-27 -2.99
2018-12-26 0.50
2018-12-25 3.59
2018-12-24 -3.43
I tried:
correlation=dfp.corr(dfd)
and got the following error:
TypeError: unsupported operand type(s) for /: 'str' and 'int'