QuestionQ187
VerifiedData Processing & TransformationsA global retail company sells products across multiple categories (e.g., Electronics, Clothing) and regions (e.g., North, South, East, West). The sales team has provided the data engineer with a PySpark dataframe named sales_df as below and the team wants the data engineer to analyze the sales data to help them make strategic decisions.

Calculate the total sales amount for each product category and store the results in a new dataframe called category_sales.
What will generate the expected result of category_sales?

Community Discussion