-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow specifying a list of column units to io.ascii.read() #9639
Comments
Oh, and for completeness, my workaround is to do: tbl = ascii.read(filename, names=['a', 'b'])
tbl['a'].unit = u.one
tbl['b'].unit = u.km/u.s
tbl = QTable(tbl) |
If we go this route, possibly handier might be to just have |
@adrn - about the workaround, QTable will automatically upgrade a Column to Quantity if you add units, so below works. (I'm not sure if this little feature is documented though...):
But I agree with @mhvk it could be useful to allow a That takes this out of the realm of This should be an easy PR. 4.0?? 😈 |
IMHO it's a little too late for 4.0 now. And since this is a new feature, how about 4.1? |
Fair enough, can't hurt to ask! |
I'm using
io.ascii.read
to read in a text table that has no column names or units, but I want to (ideally) get back aQTable
with column names and units that I specify. I know I can usenames=[...]
to set the column names, but it would be nice if there was an equivalent for units as well. For example, if I have an ascii table that looks like this:in some file, it would be nice if I could do something like:
Apologies if this functionality already exists! I couldn't find this in the
io.ascii
docs.The text was updated successfully, but these errors were encountered: