QuestionQ139

VerifiedData Processing

A data scientist receives an incomplete notebook from the data engineering team. The notebook uses a Spark DataFrame, spark_df, on which the data scientist must perform additional feature engineering. Unfortunately, the data scientist has not yet learned the PySpark DataFrame API.

Which of the following code blocks can the data scientist run to use the pandas API on Spark?

Explanation

pyspark.pandas.DataFrame accepts a Spark DataFrame as input and creates a pandas-on-Spark DataFrame, enabling pandas-style operations while retaining Spark-backed distributed processing.

Learn more

Community Discussion

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