I apologize in advance if this is a basic question, but I am having trouble accessing the data in the dataframe that is returned from my Pipeline. As I understand, the dataframe that is returned by the Pipeline will have the assets that pass my screen as the rows, and any factors I applied as columns. How would I access one cell in that dataframe? I thought it would be something along the lines of:
val = context.output.iloc[etf]['sma_10']
where, the etf object is pulled from the context.portfolio.positions dictionary in a for-each loop. However, when I call it like this I get this error:
TypeError: cannot do positional indexing on class 'pandas.indexes.base.Index' with these indexers [Equity(9458 [SGY])] of type 'zipline.assets._assets.Equity'
I can do some hack workaround by figuring out the position of the asset I am looking for in the frame, and then using that, but I feel like something like this must surely be built in to the pandas library. Please let me know if this question needs any clarification. Thanks!