You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You might also need the following environment variables to get it working:
PYSPARK_DRIVER_PYTHON=jupyter
PYSPARK_DRIVER_PYTHON_OPTS=notebook
PYSPARK_PYTHON=python
For the flip coin demo, use range instead:
heads = (sc.parallelize(range(n))
.map(lambda _: random.random())
.filter(lambda r: r <= 0.5)
.count())
Python 3 was released in 2008! Why is the code with this course in 2.x?!
The text was updated successfully, but these errors were encountered: