Yes, there are a few ways to do this. Starting with a 1D profile, like the following:
p = yt.ProfilePlot(ds, 'density', 'cell_mass', weight_field=None)
If you add the accumulation=True keyword, the profile will be the sum of all values in the previous bins.
p = yt.ProfilePlot(ds, 'density', 'cell_mass', weight_field=None, accumulation=True)
Additionally, you can access the profile object as p.profiles, which will be a list of all the profiles plotted. You could then get the bin values and profile values by doing the following:
p.profiles['cell_mass'] # mass values
p.profiles.x # density values
You can do array summation or use functions like numpy.trapz to do integration.