-
-
Save eloipuertas/8a0ac594fc57f0340c877efa23dec6c3 to your computer and use it in GitHub Desktop.
findWords.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyspark import SparkContext | |
from pyspark.sql.types import * | |
sc = SparkContext ('local[*]','pyspark') | |
src = "pride_and_prejudice.txt" | |
lines = sc.textFile(src) | |
no_lines = lines.filter( lambda x:x.lower().find("no") != -1) | |
print (no_lines.count()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment