In [1]:
#SKIP_COMPARE_OUTPUT
import pixiedust


Pixiedust database opened successfully
Pixiedust version 0.79

In [2]:
pixiedust.installPackage("graphframes:graphframes:0.1.0-spark1.6")


Package already installed: graphframes:graphframes:0.1.0-spark1.6
Out[2]:
<pixiedust.packageManager.package.Package at 0x118ddba50>

In [3]:
#import the Graphs example
from graphframes.examples import Graphs
#create the friends example graph
g=Graphs(sqlContext).friends()

In [4]:
g.vertices.show()


+---+-------+---+
| id|   name|age|
+---+-------+---+
|  a|  Alice| 34|
|  b|    Bob| 36|
|  c|Charlie| 30|
|  d|  David| 29|
|  e| Esther| 32|
|  f|  Fanny| 36|
+---+-------+---+


In [5]:
g.edges.show()


+---+---+------------+
|src|dst|relationship|
+---+---+------------+
|  a|  b|      friend|
|  b|  c|      follow|
|  c|  b|      follow|
|  f|  c|      follow|
|  e|  f|      follow|
|  e|  d|      friend|
|  d|  a|      friend|
+---+---+------------+