You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2017/07/14 00:35:38 UTC
zeppelin git commit: Add z.show() feature to docs
Repository: zeppelin
Updated Branches:
refs/heads/master db7fbf276 -> a7dd914b5
Add z.show() feature to docs
I was unaware of this really nice feature, which led me to writing my own "zeppelin_show" function.
### What is this PR for?
(tiny) improvement of the docs
Author: TwUxTLi51Nus <Tw...@users.noreply.github.com>
Closes #2488 from TwUxTLi51Nus/patch-1 and squashes the following commits:
7ab6f41 [TwUxTLi51Nus] Add z.show() feature to docs
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/a7dd914b
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/a7dd914b
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/a7dd914b
Branch: refs/heads/master
Commit: a7dd914b5e10055ba0dc50ce28cf32bd97438ad1
Parents: db7fbf2
Author: TwUxTLi51Nus <Tw...@users.noreply.github.com>
Authored: Wed Jul 12 23:31:35 2017 +0200
Committer: Lee moon soo <mo...@apache.org>
Committed: Fri Jul 14 09:35:32 2017 +0900
----------------------------------------------------------------------
docs/interpreter/spark.md | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a7dd914b/docs/interpreter/spark.md
----------------------------------------------------------------------
diff --git a/docs/interpreter/spark.md b/docs/interpreter/spark.md
index b49c903..122c8db 100644
--- a/docs/interpreter/spark.md
+++ b/docs/interpreter/spark.md
@@ -297,6 +297,14 @@ z.load("groupId:artifactId:version").local()
## ZeppelinContext
Zeppelin automatically injects `ZeppelinContext` as variable `z` in your Scala/Python environment. `ZeppelinContext` provides some additional functions and utilities.
+### Exploring Spark DataFrames
+`ZeppelinContext` provides a `show` method, which, using Zeppelin's `table` feature, can be used to nicely display a Spark DataFrame:
+
+```
+df = spark.read.csv('/path/to/csv')
+z.show(df)
+```
+
### Object Exchange
`ZeppelinContext` extends map and it's shared between Scala and Python environment.
So you can put some objects from Scala and read it from Python, vice versa.