Parse dict to cudf

I have messages in kafka and I’m trying read that messages with cuStreamz, my problems is that when I see my cudf with the messages, the rows have dictionaries, I’m trying parse that info into standard cudf.

For example I tried the next code:

import cudf

def f(row):
return row[‘a’][‘1’][‘box’][0]

z = {‘1’:{‘box’:[0,1,2,3]}}
df = cudf.DataFrame({‘a’: [z,z,z]})

But shows the next error message:

… ValueError: user defined function compilation failed.

Somebody have an idea about how parse this kind of info?