Skip to content
Snippets Groups Projects
Commit 3f945e3b authored by Patrick Wendell's avatar Patrick Wendell
Browse files

Make module help available in python shell.

Also, adds a line in doc explaining how to use.
parent 58a7d320
No related branches found
No related tags found
No related merge requests found
...@@ -80,6 +80,7 @@ The Python shell can be used explore data interactively and is a simple way to l ...@@ -80,6 +80,7 @@ The Python shell can be used explore data interactively and is a simple way to l
>>> words = sc.textFile("/usr/share/dict/words") >>> words = sc.textFile("/usr/share/dict/words")
>>> words.filter(lambda w: w.startswith("spar")).take(5) >>> words.filter(lambda w: w.startswith("spar")).take(5)
[u'spar', u'sparable', u'sparada', u'sparadrap', u'sparagrass'] [u'spar', u'sparable', u'sparada', u'sparadrap', u'sparagrass']
>>> help(pyspark) # Show all pyspark functions
{% endhighlight %} {% endhighlight %}
By default, the `pyspark` shell creates SparkContext that runs jobs locally. By default, the `pyspark` shell creates SparkContext that runs jobs locally.
......
...@@ -4,6 +4,7 @@ An interactive shell. ...@@ -4,6 +4,7 @@ An interactive shell.
This file is designed to be launched as a PYTHONSTARTUP script. This file is designed to be launched as a PYTHONSTARTUP script.
""" """
import os import os
import pyspark
from pyspark.context import SparkContext from pyspark.context import SparkContext
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment