I was trying to translate Scala into python with PySpark 2.4.0 .Codes below aims to extract col 'list' value using col 'num' as index.
I suppose to use new func 'element_at' in 2.4.0 .But it gives an error:
TypeError: Column is not iterable
Finally ,I have to use udf to solve this problem.
But in Scala ,it is ok when the second param 'extraction' in func 'element_at' is a col name with int type:
I hope it could be fixed in latest version.