How To: Pass values between Scala and Python interpreters in Notebook

Description:

This article tells how to pass variable values between Scala and Python interpreters in Notebooks.

How To:

You can pass variable from between spark and pyspark in this way.

    %spark
    z.put("var1", myVar)

    %pyspark
    myVar = z.get("var1")

Similarly, you can pass variables values from pyspark to spark.

Have more questions? Submit a request

Comments

Powered by Zendesk