In this case, we want to show if the value is in Miles or Kilometers:
Having the units in the data section makes it more discoverable since it is displayed right next to the item it relates too. Users are probably more likely to look right at the table content since that's the interesting stuff. I can see that the units make it look busier but that can be addressed by making units less prominent visually.
Putting units in the data section makes it busier and harder to "parse" at a glance. But there's one complex scenario - when your data varies a lot - e.g. when you need to print precise file sizes that vary from a couple bytes to several Gb.
My rules of thumb are:
- If unit does not change - print in the header to have cleaner data section.
- If possible, strive to use the same unit (e.g. if you print sizes that vary from mm to km, use meters - this way it will be easier for the user to compare values at a glance).
- Print units in the data section if different units are used.
- Never mix measurement systems.