GithubHelp home page GithubHelp logo

jkthompson / pyspark-pictures Goto Github PK

View Code? Open in Web Editor NEW
168.0 12.0 102.0 3.46 MB

Learn the pyspark API through pictures and simple examples

Home Page: http://data-frack.blogspot.com/2015/01/visual-mnemonics-for-pyspark-api.html

License: MIT License

Shell 0.15% Jupyter Notebook 99.85%

pyspark-pictures's Introduction

pyspark-pictures

Learn the pyspark API through pictures and simple examples

View on NBViewer

RDD Example:

example image

# flatMap
x = sc.parallelize([1,2,3])
y = x.flatMap(lambda x: (x, 100*x, x**2))
print(x.collect())
print(y.collect())

[1, 2, 3]
[1, 100, 1, 2, 200, 4, 3, 300, 9]

Install (for interactive use)

  1. install Spark
  2. install IPython notebook

Quick Start

  1. start pyspark inside IPython notebook

    IPYTHON_OPTS="notebook" pyspark
  2. open browser to notebook link

  3. open pyspark-pictures.ipynb or pyspark-pictures-dataframes.ipynb

  4. edit example code, press: ctrl + enter to run each cell

References

pyspark API

Contribute

Contributors are welcome
Original images are here, download to pdf, convert to svg with: genSVD (pdf2svg)

pyspark-pictures's People

Contributors

jkthompson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyspark-pictures's Issues

Pictures not visible (from blog comment)

Thanks.
The best cheet sheet of pyspark.
In the notebook the pictures are not visible and complains about the v3 version, instead of the v4.
Python 2.7.6 , IPython 3.1.0 , in a prepackaged VM with Spark (from Edx mooc)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.