QuestionQ251

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

The code block below must return a DataFrame containing every column from DataFrame storesDF except the sqft and customerSatisfaction columns. Choose the response that correctly completes the numbered blanks in the code block.

__1__.__2__(__3__)  
Explanation

PySpark DataFrame.drop(*cols) returns a new DataFrame with the specified columns removed. Passing "sqft" and "customerSatisfaction" as string column names to storesDF.drop removes exactly those two columns.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!