astropy/astropy — pull request #2950 by eteq (2014-09-16 21:00:03+00:00)
Title: Add `to` method to table columns

This PR adds a new meth to table columns called `to`. It's analogous to the `to` of `Quantity`, in that it returns a `Quantity` object in the requested units.

It also works as an "easy" way to get out `Quantity` objects if you do ``.to(None)``. I say "easy" because it's really just syntactic sugar for u.Quantity(table['colname'])... But I find the latter to be more awkward to use in regular code, so I like the option to call a method that yields a Quantity. And the unit-conversion is of course valuable in various circumstances.

cc @taldcroft @astrofrog @mhvk