Hi Folks
I've been trying to extract a single value from a dataframe returned by the pipeline. Not sure if I'm doing something wrong or there's a bug in get_value ?
Algo is fairly straightforward. Here's how I'm building the pipeline:
def make_pipeline():
returns_builtin = Returns(
window_length=20,
)
return Pipeline(
columns={
'Builtin_returns': returns_builtin,
}, screen = StaticAssets(symbols('AMZN', 'MSFT', 'ADBE'))
)
And here's my attempt at parsing the output
def before_trading_start(context,data):
msft = symbols('MSFT')
result_today_df = algo.pipeline_output('my_pipeline')
print((result_today_df.get_value(msft,'Builtin_returns')))
However get_value throws this runtime error:
TypeError: '[Equity(5061 [MSFT])]' is an invalid key There was a
runtime error on line 102.
Funny thing is the pipeline does return a 3x1 shaped dataframe
Appreciate your help in figuring this out