David Michael Carter
02/28/2022, 5:03 PMfinalDF = finalDF.append(foo.map(aList))
TypeError: cannot concatenate object of type '<class 'prefect.tasks.core.function.FunctionTask'>'; only Series and DataFrame objs are valid
Am I on the right track here, or do I need a completely new approach?Kevin Kho
02/28/2022, 5:07 PMfoo.map()
and then if you get a list of DataFrames, you’ll need another task for that logic. There is a distinction between build time and runtime. Tasks are evaluated during runtime. This append is evaluated during build time when foo.map
hasn’t materialized yet.
You likely need to encapsulate this logic in a task and call the append inside a task to defer the executionDavid Michael Carter
02/28/2022, 5:50 PMfoo.map()
is a list obj