How to run pycharm programs in itversity lab

pyspark

#1

I’ve been trying to keep up with https://www.youtube.com/watch?v=RsALKtZvqFo&index=16&list=PLf0swTFhTI8rT3ApjBqt338MCO0ZvReFt&t=228s this video, where it is being taught how to run python program in pycharm using spark.

My pycharm is not working, how do I practice the same programs in Itversity Lab?

The following is the code
"
from pyspark import SparkConf, SparkContext

sc = SparkContext(master=“local”,appName= “Spark Demo”)
print(sc.textFile(“c:\deckofcards.txt”).first())

"


#2

@vamosvamshi,

To perform the same in labs.Use the below steps.

  1. Need to copy the file from local to labs.

  2. Then perform the below commands

    from pyspark import SparkConf, SparkContext
    sc = SparkContext(master=“local”,appName= “Spark Demo”)
    print(sc.textFile(“file:///home/sravankumar/filename.txt”).first())