Code Monkey home page Code Monkey logo

cleaning-data-with-pyspark's Introduction

Cleaning-Data-with-PySpark

Description

To learn what’s needed to prepare data processes using Python with Apache Spark. You’ll learn terminology, methods, and some best practices to create a performant, maintainable, and understandable data processing platform.

1. DataFrame details

A review of DataFrame fundamentals and the importance of data cleaning.

  • Defining a schema: StructField()
  • Parquet: .withColumnRenamed(), .union()

2. Manipulating DataFrames in the real world

A look at various techniques to modify the contents of DataFrames in Spark.

  • .where(), .size(), .getItem(), .distinct(), when(), .otherwise(), .rand()`
  • User defined functions or UDFs
  • Partitioning: .rdd.getNumPartitions()
  • Adding an ID Field: .monotonically_increasing_id()

3. Improving Performance

Improve data cleaning tasks by increasing performance or reducing resource requirements.

  • Caching: .cache(), .is_cached(), .unpersist()
  • Caculating running time: start_time = time.time() time.time() - start_time
  • Cluster configurations: spark.conf.get(), spark.conf.set()
  • Shuffling: .explain(), .coalesce(num_partitions), .join(), .broadcast()`

4. Complex processing and data piplines

Learn how to process complex real-world data using Spark and the basics of pipelines.

  • .write(), print("Initial count: %d\nFinal count: %d" % (initial_count, final_count))
  • Project: Resolve questions about the type of dogs seen in an image and some details regarding the images.

cleaning-data-with-pyspark's People

Contributors

cc59chong avatar

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.