Question: Your manager asks you to create a pivot table for the customers data frame that contains the median values for the sales and orders by
Your manager asks you to create a pivot table for the customers data frame that contains the median values for the sales and orders by region and gender, columns show product_group, and fill the missing value with 0. Which of the following codes will you use for that?\ \ \ Your manager asks you to create a pivot table for the customers data frame that contains the median values for the sales and orders by region and gender, columns show product_group, and fill the missing value with 0. Which of the following codes will you use for that?\ \ \ customers.pivot_table ([sales, orders], index = [region, gender], columns = product_group, aggfunc = median, fill_value = 0)\ \ \ customers.pivot_table ([sales, orders], index = [region, gender], columns = product_group, aggfunc = median, fill_na= 0)\ \ \ df.pivot_table ([sales, orders], index = [region, gender], columns = product_group, aggfunc = median, fill_value = 0)\ \ \ customers.pivot_table ([sales, orders], columns = [region, gender], index = product_group, aggfunc = median, fill_value = 0)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
