0 votes
in PySpark by
What do you know about PySpark SparkFiles?

1 Answer

0 votes
by

PySpark facilitates users to upload their files using sc.addFile. Here, sc is our default SparkContext. We can also get the path of the working directory using SparkFiles.get. SparkFiles provides the following types of class methods to resolve the path to the files added through SparkContext.addFile():

get(filename)

getrootdirectory()

Related questions

0 votes
asked Mar 13, 2022 in PySpark by rajeshsharma
+1 vote
asked Mar 13, 2022 in PySpark by rajeshsharma
...