Csv#
- class astropy.io.ascii.Csv[source]#
Bases:
Basic
CSV (comma-separated-values) table.
This file format may contain rows with fewer entries than the number of columns, a situation that occurs in output from some spreadsheet editors. The missing entries are marked as masked in the output table.
Masked values (indicated by an empty ‘’ field value when reading) are written out in the same way with an empty (‘’) field. This is different from the typical default for
astropy.io.ascii
in which missing values are indicated by--
.Since the CSV format does not formally support comments, any comments defined for the table via
tbl.meta['comments']
are ignored by default. If you would still like to write those comments then include a keywordcomment='#'
to thewrite()
call.Example:
num,ra,dec,radius,mag 1,32.23222,10.1211 2,38.12321,-88.1321,2.2,17.0
Methods Summary
inconsistent_handler
(str_vals, ncols)Adjust row if it is too short.
Methods Documentation