I have a dataframe which looks like this:
My end goal is to calculate the percent of each purpose and for each origin
So the final table should look this:
Any assistance or direction will be greatly appreciated
I have a dataframe which looks like this:
My end goal is to calculate the percent of each purpose and for each origin
So the final table should look this:
Any assistance or direction will be greatly appreciated
Use this to drop the unwanted rows
i = df[(df.Origin == 'total origin')].index
df = df.drop(i)
And this to drop the Values column
df = df.drop(columns='Values')