Loading tutorials
spark session, which the previous chapter covered.2 min readprintSchema, show, and display. It assumes you can attach a notebook to compute and that you know what a DataFrame is. It also assumes the notebook already provides a spark session.2 min readspark and display. It explains why some lines of Spark code finish instantly and others start a job.2 min readspark.createDataFrame. Here you will learn what a schema is, which types you will meet most often, and how to set a schema yo2 min readspark is already defined, and understand that a DataFrame has a schema. You will read files and tables into DataFrames and avoid the common mistakes.2 min readspark is already available, and that you know what a DataFrame is. You should also be comfortable with basic Python or SQL.2 min readspark is already defined, and have seen a DataFrame with a schema. It uses the orders DataFrame from earlier chapters, with order_id, customer, order_date and amount columns.1 min readselect and filter. You should also know that Spark transformations are lazy. Here you will add and change columns with withColumn and related methods.2 min readwithColumn and filter, and know that transformations are lazy. It covers how Spark treats missing values and repeated rows, and the mistakes that follow from each.2 min readwithColumn. It uses the orders DataFrame from earlier chapters, in a Databricks notebook where spark already exists.2 min readdisplay runs them.2 min readgroupBy and agg, and read basic PySpark column expressions. It uses the orders DataFrame from earlier chapters, with columns order_id, customer, order_date and amount.2 min readF.col and built-in functions, and write basic SQL SELECT ... GROUP BY queries. You will learn to move between the two styles in one notebook.2 min readsaveAsTable, what the write modes do, and the errors you are most likely to hit.2 min readgroupBy and join work. Here you will learn to read a query plan, spot the shuffles that make cells slow, and use caching when it helps.2 min readwithColumn, and use functions from pyspark.sql.functions. It covers two escape hatches from Spark's built-in engine: user-defined functions (UDFs) and conversion to pandas. Both work, and both cost something.2 min read