Calcular porcentaje por valores de columna
Tengo el siguiente marco de datos sobre vehículos registrados en Suiza:
Fuel Year Region Count
Gasoline 2013 GE 169600
Diesel 2013 GE 46790
Hybrid 2013 GE 2268
Electric 2013 GE 85
Other 2013 GE 532
Gasoline 2013 VS 149232
Diesel 2013 VS 50591
Hybrid 2013 VS 1028
Electric 2013 VS 268
Other 2013 VS 261
Me gustaría agregar una columna "Pct" adicional en el marco de datos con el porcentaje del tipo de combustible por año y región, pero tengo algunas dificultades para entender cómo. El resultado debería ser:
Fuel Year Region Count Pct
Gasoline 2013 GE 169600 0.7734
Diesel 2013 GE 46790 0.2134
Hybrid 2013 GE 2268 0.0134
Electric 2013 GE 85 0.0004
Other 2013 GE 532 0.0024
Gasoline 2013 VS 149232 0.7410
Diesel 2013 VS 50591 0.2512
Hybrid 2013 VS 1028 0.0051
Electric 2013 VS 268 0.0013
Other 2013 VS 261 0.0013