spark file extension should be py code example Example: pyspark to read file from windows file system rdd = sc.textFile("file:///path/to/file")