Complete the code to write the DataFrame as a parquet file.
df.write.parquet([1])The parquet method requires the output path as a string.
Complete the code to partition the output by the column 'year'.
df.write.partitionBy([1]).parquet("/output/path")
The partitionBy method expects the column name as a string.
Fix the error in the code to write partitioned data by 'country'.
df.write.partitionBy([1]).save("/data/output")
The partitionBy method requires the column name as a string, so it must be in quotes.
Fill both blanks to write the DataFrame partitioned by 'state' and saved as JSON.
df.write.[1]By([2]).json("/json/output")
The method is partitionBy and the column name must be a string.
Fill all three blanks to write the DataFrame partitioned by 'category', saved as parquet, and overwrite existing data.
df.write.mode([1]).[2]By([3]).parquet("/final/output")
Use mode("overwrite") to overwrite data, partitionBy to partition, and the column name as a string.
