O'Reilly logo

Apache Spark for Data Science Cookbook by Padma Priya Chitturi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sparkling Pandas

Sparkling Pandas aims to make use of the distributed computing power of PySpark to scale the data analysis with Pandas. This is built on Spark's DataFrame and provides API similar to Pandas. This recipe shows how to use Sparkling Pandas.

Getting ready

To step through this recipe, you will need a running Spark Cluster either in pseudo distributed mode or in one of the distributed modes, that is, standalone, YARN, or Mesos. Also, have Python and IPython installed on the Linux machine, that is, Ubuntu 14.04.

How to do it…

  1. Install blas, scipy, and sparklingpandas as follows:
         apt-get install libblas-dev liblapack-dev libatlas-base-dev
         gfortran 
         pip install scipy 
         pip install sparklingpandas 
    
    
  2. Now import the package as follows:
     import sparklingpandas ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required