I am trying to concat along 2 columns in pandas. The code :
import pandas as pd
import numpy as np
from statsmodels import api as sm
import pandas_datareader.data as web
import datetime
start = datetime.datetime(2015,2,12)
end = datetime.datetime.today()
df = web.get_data_yahoo(['F', '^GSPC'], start, end)
df1 = df.concat(columns=[F['Close'], gspc['Close']], axis=1)
But i am getting the following error:
AttributeError: 'DataFrame' object has no attribute 'concat'
所有评论(0)