To aid Data Engineers converting from SQL to Python, the table below lists common data operations.
SQL | Python |
SELECT name FROM customers | df = spark.read.json("examples/src/main/resources/people.json") df.select("name").show() |
SELECT name FROM customers WHERE age > 21 | df.filter(df['age'] > 21).show() |