Skip to content

Commit 23c1376

Browse files
author
Marc Ramirez
committed
Change python entry point sentence
1 parent ae5f7e1 commit 23c1376

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs/using/specifics.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ Spark local mode is useful for experimentation on small data when you do not hav
1313
#### In a Python Notebook
1414

1515
```python
16-
import pyspark
17-
sc = pyspark.SparkContext('local[*]')
18-
16+
from pyspark.sql import SparkSession
17+
spark = SparkSession.builder.appName("SimpleApp").getOrCreate()
1918
# do something to prove it works
20-
rdd = sc.parallelize(range(1000))
21-
rdd.takeSample(False, 5)
19+
spark.sql('SELECT "Test" as c1').show()
2220
```
2321

2422
#### In a R Notebook

0 commit comments

Comments
 (0)