Reputation: 1
I am having netflix worksheet in c drive by using pyspark i am not able read data.here is my code
import findspark
findspark.init()
import pyspark from pyspark.sql import SparkSession spark = SparkSession.builder.getOrCreate() spark
df=spark.read.csv("C:\netflix.csv")
df.show()
it was showing error in line df=spark.read.csv help me to run it
df=spark.read.csv("C:\netflix.csv") df.show()
AnalysisException: Path does not exist: file:/C:
etflix.csv help me to sort it out. given path right but showing error
Upvotes: 0
Views: 49
Reputation: 3348
Fo Windows,
Escape "\"
i.e. df=spark.read.csv("C:\\netflix.csv")
Upvotes: 1