Hello guys, I'm trying to map over pandas datafram...
# prefect-community
Hello guys, I'm trying to map over pandas dataframe groups, but I can't quite get it to work even though I am able to iterate over it in a python for-loop just fine. This is what I'm trying to do:
But it gives me:
KeyError: 'Column not found: 0'
Does anyone know if mapping over groups is supported and if yes, how? Thanks in advance
Hi Jonas, mapping over pandas dataframes is not currently supported - mapped objects must be list-like (e.g., indexed by position); if you can convert your groupby object into a list then you should be good!
👍 1
Amazing, works like a charm. Thank you very much!
^, use
instead. Even better, have a task return
, and map over the output of said task.