我建議你使用一個Panel,例如:
>>> from pandas.io.data import DataReader
>>> from pandas import Panel, DataFrame
>>> symbols = ['AAPL', 'GLD', 'SPX', 'MCD']
>>> data = dict((symbol, DataReader(symbol, "yahoo", pause=1)) for symbol in symbols)
>>> panel = Panel(data).swapaxes('items', 'minor')
>>> closing = panel['Close'].dropna()
>>> closing.head()
AAPL GLD MCD SPX
Date
2010-01-04 214.01 109.80 62.78 1132.99
2010-01-05 214.38 109.70 62.30 1136.52
2010-01-06 210.97 111.51 61.45 1137.14
2010-01-07 210.58 110.82 61.90 1141.69
2010-01-08 211.98 111.37 61.84 1144.98
如果你想看到更多的看一看this例如我爲一療程製成。
我對類似類型的分析,http://pandas.pydata.org/pandas-docs/dev/dsintro.html#panel的面板,你可以從一個面板轉換一個2級與to_panel(雖然通常更容易直接構建) – Jeff