
Ultimate access to all questions.
Which of the following code blocks creates a new DataFrame with a column named employeesPerSqft calculated as the division of numberOfEmployees by sqft from the original DataFrame storesDF? The employeesPerSqft column does not exist in storesDF.
A
storesDF.withColumn("employeesPerSqft", col("numberOfEmployees") / col("sqft"))
B
storesDF.withColumn("employeesPerSqft", "numberOfEmployees" / "sqft")
C
storesDF.select("employeesPerSqft", "numberOfEmployees" / "sqft")
D
storesDF.select("employeesPerSqft", col("numberOfEmployees") / col("sqft"))
E
storesDF.withColumn(col("employeesPerSqft"), col("numberOfEmployees") / col("sqft"))