I was using Spark 1.2.x earlier and my PySpark worked well with that version.


When I upgraded into Spark 1.5.0. I am getting Syntax Error, Same code which
worked Earlier. Dont know where is the issue.

.map(lambda (k,v): (k,list(set(v)))).map(lambda (k,v): (k,{v2:i for i, v2 in
enumerate(v)})).collectAsMap()
                                                                   ^
SyntaxError: invalid syntax

Could you please advice me on this ?

Thanks in Advance.






--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/New-syntax-error-in-Spark-with-for-loop-tp26781.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to