yt.units.unit_object.Unit.as_coeff_Mul

Unit.as_coeff_Mul(rational=False)

Efficiently extract the coefficient of a product.