It looks like you are using a scalar pandas_udf type, which doesn't support returning structs currently. I believe the return type you want is an array of strings, which is supported, so this should work. Try this: @pandas_udf("array<string>")
# return a pandas series of a list of strings, that is same length as input - for example
s = pd.Series([[u"a", u"b"]] * len(x))
return s If you are using Python 2, make sure your strings are in unicode otherwise they might get interpreted as bytes. Hope that helps!
... View more