Skip to content

Instantly share code, notes, and snippets.

@AlessandroChecco
AlessandroChecco / Spark Dataframe Cheat Sheet.py
Last active July 23, 2024 03:05 — forked from evenv/Spark Dataframe Cheat Sheet.py
Cheat sheet for Spark Dataframes (using Python)
# A simple cheat sheet of Spark Dataframe syntax
# Current for Spark 1.6.1
# import statements
#from pyspark.sql import SQLContext
#from pyspark.sql.types import *
#from pyspark.sql.functions import *
from pyspark.sql import functions as F
#SparkContext available as sc, HiveContext available as sqlContext.