@niranjan_283 wrote:
I have a csv data set with the columns like Sales,Last_region
i want to calculate the percentage of sales for each region, i was able to find the sum of sales with in each region but i am not able to find the percentage with in group by statement.Groupby statement used
tempsalesregion = customerdata.groupby(["Last_region"]) tempsalesregion = tempsalesregion[["Customer_Value"]].sum().add_prefix("Sum_of_").reset_index() tempsalesregion
Output is
But what i need is the percentage of sales per region,i am not able to figure out how to find that out.
Posts: 1
Participants: 1