1

I asked a similar question yesterday, which was answered splendidly, but I missed adding a detail.

Attached is a command, its output, and the issue I have now. This outputs g/cm^3, but I'd rather have the units in kg/m^3.

I guess I don't know how to handle the command which outputs all the data at once. How can the units be changed for this kind of output?

Thank you (again)enter image description here

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
fiz
  • 736
  • 1
  • 6
  • 13
  • 2
    For future reference, please add your code as text, and not as pictures, so we don't have to retype it ourselves. – MarcoB Jan 05 '21 at 19:13

1 Answers1

3
UnitConvert[
 PlanetData[PlanetData[], "Density", "EntityAssociation"],
 "Kilograms"/"Meters"^3
]

Of course I am sure you are aware that the two units result in the same numerical results, i.e. 1 g/cm^3 = 1 kg/m^3.

MarcoB
  • 67,153
  • 18
  • 91
  • 189