Skip to content

io.ascii doesn't know about table column formats #330

Closed

Description

@eteq

If I make an astropy.table.Table and do table['somecolumn'].format = '%.2f', the various table printing methods work as expected: the column prints as a 2 sigfig floating point number. However, if I then do astropy.io.ascii.write(table,'somefile.dat'), the resulting ascii file does not respect the format specifier for the column.

I'm not actually sure if it's better to have it do so or not, but it's ambiguous whether it's supposed to or not, so this issue can be viewed as either a request to implement this (respecting format when using astropy.io.ascii.write on a table), or clarifying in the docs that this will not work the way one might expect.

Activity

  1. taldcroft commented on Jul 30, 2012

    @taldcroft
    Member

    This is part of the bigger issue #307 to really integrate Table and io.ascii. But good to leave this open as an explicit issue that needs to be addressed.

  2. taldcroft commented on Jul 30, 2012

    @taldcroft
    Member

    How many days are we going to sprint at the next astropy meeting at STScI??? I need all of them. :-)

  3. eteq commented on Aug 1, 2012

    @eteq
    MemberAuthor

    Well, tell us how many you'll need and we'll make it happen :)

  4. embray commented on Dec 17, 2012

    @embray
    Member

    For some reason this is placed in the 0.3 milestone, but was fixed by #483, so it will be in 0.2.

  5. added a commit that references this issue on Oct 9, 2013
    a9cc271
  6. added a commit that references this issue on Jun 12, 2019
  7. added a commit that references this issue on Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions