Skip to content

Instantly share code, notes, and snippets.

@64lines
Created June 26, 2018 03:44
Show Gist options
  • Select an option

  • Save 64lines/50e09fcfb81ff7746ea161898f4b41af to your computer and use it in GitHub Desktop.

Select an option

Save 64lines/50e09fcfb81ff7746ea161898f4b41af to your computer and use it in GitHub Desktop.
[PYSPARK] - Example Code
from pyspark.context import SparkContext
spark = SparkSession.builder.master("local").appName("rel subject").getOrCreate()
file_path = 'some_file.csv'
dataframe = spark.read.csv(path=file_path, header=True)
dataframe = dataframe.filter(dataframe['value'] >= 0.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment