How to load a file from the local file system to Spark using sc.textFile? Do I need to change any -env variables? Also when I tried the same on my windows
The file path you have defined is incorrect.
Try changing
sc.textFile("file///C:/Users/swaapnika/Desktop/to do list")
to
sc.textFile("file://C:/Users/swaapnika/Desktop/to do list")
or
sc.textFile("C:/Users/swaapnika/Desktop/to do list")