We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f8c3e3d + 23c1376 commit af17bdfCopy full SHA for af17bdf
docs/using/specifics.md
@@ -13,12 +13,10 @@ Spark local mode is useful for experimentation on small data when you do not hav
13
#### In a Python Notebook
14
15
```python
16
-import pyspark
17
-sc = pyspark.SparkContext('local[*]')
18
-
+from pyspark.sql import SparkSession
+spark = SparkSession.builder.appName("SimpleApp").getOrCreate()
19
# do something to prove it works
20
-rdd = sc.parallelize(range(1000))
21
-rdd.takeSample(False, 5)
+spark.sql('SELECT "Test" as c1').show()
22
```
23
24
#### In a R Notebook
0 commit comments