I want to import two time series from Quandl and want to find the correlation between them. I found out about the pandas and tried with the corr function, however I always get the error ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
I really don't know what is wrong with this code, I printed the arrays and they look fine.
Here is my code:
import pandas as pd
import quandl
quandl.ApiConfig.api_key = "XXX"
series1 = quandl.get("BUNDESBANK/BBK01_WT5511", start_date="2017-01-01")
series2 = quandl.get("FRED/DCOILBRENTEU", start_date="2017-01-01")
print(series1.corr(series2))