Data engineering practice
Learn PySpark: tutorials, an online compiler and practice problems
Learn Apache Spark with Python, run PySpark in your browser, and practise with auto-graded PySpark, SQL and Python exercises. Follow a learning path or build a data engineering project.
from pyspark.sql import SparkSession
spark = SparkSession.builder.getOrCreate()
sales = spark.createDataFrame(
[("East", 120), ("East", 120), ("West", 180)],
["region", "amount"],
)
(sales.groupBy("region")
.sum("amount")
.orderBy("region")
.show())| region | sum(amount) |
|---|---|
| East | 240 |
| West | 180 |
Today's challenge
Loading today’s challenge…
Learning, practice and career tools
PySpark tutorials
Start with DataFrames, then work through joins, window functions and Spark performance.
Online PySpark compiler
Run PySpark, SQL and Python in your browser. Try examples with a practice dataset.
Challenge Arena
Solve auto-graded PySpark, SQL and Python exercises and compare your output with the sample.
Learning paths
Follow a sequence of exercises as you build skills in SQL, PySpark and data engineering.
Data engineering projects
Practise building pipelines, troubleshooting incidents and solving larger problems.
Interview questions
Review Spark, SQL and Python questions, then try a timed interview exercise.
Certification practice
Prepare for Databricks and AWS exams with independent practice questions, mock tests and explanations.
Data engineering jobs
Browse roles by location, experience and skills.
Data engineering blog
Read practical guides to Spark, SQL, pipelines and the tools data engineers use.
Learn PySpark step by step
PySpark is the Python API for Apache Spark, the engine data teams use for data too large for one machine. You write DataFrame code such as select, filter, groupBy and join, and Spark runs it in parallel across a cluster. Follow these topics in order, run every example in your browser, then test yourself on a problem.
See the full PySpark coursePySpark questions
What is PySpark?
PySpark is the Python API for Apache Spark. You write DataFrame code in Python, and Spark runs it in parallel across a cluster, so the same code works on a few rows or on billions.
Do I need to install Spark to practise?
No. The PySpark compiler on this site runs your code in the browser on sample datasets, so you can run examples without setting up Spark locally.
Is PySpark.in free?
The tutorials, the compiler and most practice problems are free. A one-time Premium Pass unlocks premium challenge access. Certification practice has its own free and paid options.
How do I prepare for a PySpark interview?
Learn the DataFrame basics first, then practise joins, aggregations and window functions on graded problems, and review the most asked interview questions with their answers.