The correct answer is B.
Explanation:
The write method is used to write a DataFrame to a file system in various formats.
The json method specifies that the output format should be JSON.
The filePath argument specifies the location to write the output file.
Option A is incorrect because option requires a key-value pair (e.g., option("key", "value")).
Option C is incorrect because path is not a valid option for write.
Option D is incorrect because write method requires a format argument to specify the output format.
Option E is a valid option, but the parentheses after write are unnecessary.
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
juliom6
1 year ago4be8126
1 year, 6 months ago