Convert Scala RDD Map Function to Pyspark

Your scala code returns a 2 element list from args.

Your python code is returning a comma joined string

This would return the same thing

lambda args: [str(args[0]), "|".join(map(str, args))]

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top