Hi,
Relatively new to Python so hopefully not a stupid question:
I'm attempting to generate multiple DataFrames of historic pricing,one per set of securities, and putting them in a dictionary, but for some reason I'm getting a Pandas Panel instead:
for industry in context.industrydic.keys():
context.frame = data.history(context.industrydic[industry],['close'], context.lookback,'1d')
**context.frame.columns = map(lambda x: x, context.frame.columns)**
context.priceframe[industry] = context.frame
On the marked line I'm getting an error since the Panel doesn't have columns. For context, industrydic is a dictionary with the keys being Morningstar industry codes, and the values being a list of tickers with that industry code.
I've read a bit about it and would only expect to get a Panel if asking for multiple fields on multiple securities, which I'm not.
This works fine in Research but when I move to Algorithm IDE it starts breaking.
Any ideas please let me know!
Thanks!