Hello again - I have a question regarding `tags`. ...
# ask-community
i
Hello again - I have a question regarding
tags
. I am trying to retrieve a
pd.DataFrame
from the result of a
merge
. Like so:
Copy code
definitions = get_defs_flow.get_tasks(tags={"final_definitions"})#[1]
definitions_df = get_defs_state.result[definitions].result
The
tag
in the
Flow
looks like this:
Copy code
with tags("final_definitions"):
        definitions_df = merge(df1, df2)
When
df1
is the result of the
merge
a
list
is returned with
merge
as the first item in the
list
.
Copy code
[<Task: Merge>, <Task: GetItem>]
When
df2
is the result of the
merge
a
list
is returned with
merge
as the second item in the
list
.
Copy code
[<Task: GetItem>, <Task: Merge>]
How do I explicitly call the
merge
result? Thanks I could loop through the list and get a
df
but that would be a coding travesty 🙂
c
Hey @itay livni! You might try filtering on both the tag and the name:
Copy code
definitions = get_defs_flow.get_tasks(tags={"final_definitions"}, name="Merge")
i
Thanks. Works.