You are working for MDFT Pro, a well-known training agency. You are building a solution using a Fabric notebook. You have a Spark DataFrame assigned to a variable named df
. The DataFrame returns four columns.
You need to change the DataFrame as follows:
Which PySpark code should you use to achieve the goal?
Choose the correct answer from the options below.
Explanations for each answer: