Bases: astropy.io.votable.tree.Element, astropy.io.votable.tree._IDProperty, astropy.io.votable.tree._NameProperty, astropy.io.votable.tree._UcdProperty, astropy.io.votable.tree._DescriptionProperty
TABLE element: optionally contains data.
It contains the following publicly-accessible and mutable attribute:
array: A Numpy masked array of the data itself, where each row is a row of votable data, and columns are named and typed based on the <FIELD> elements of the table. The mask is parallel to the data array, except for variable-length fields. For those fields, the numpy array’s column type is “object” ("O"), and another masked array is stored there.
If the Table contains no data, (for example, its enclosing Resource has type == ‘meta’) array will have zero-length.
The keyword arguments correspond to setting members of the same name, documented below.
Attributes Summary
links | A list of Link objects (pointers to other documents or servers through a URI) for the table. |
params | A list of parameters (constant-valued columns) for the table. |
ref | |
format | [required] The serialization format of the table. Must be |
nrows | [immutable] The number of rows in the table, as specified in |
groups | A list of Group objects describing how the columns and parameters are grouped. |
infos | A list of Info objects for the table. |
fields | A list of Field objects describing the types of each of the data columns. |
Methods Summary
parse(iterator, config) | |
to_table() | Convert this VO Table to an astropy.table.Table instance. |
get_field_by_id(ref[, before]) | Looks up a FIELD or PARAM element by the given ID. |
iter_groups() | Recursively iterate over all GROUP elements in the TABLE. |
create_arrays([nrows, config]) | Create a new array to hold the data based on the current set of fields, and store them in the array and member variable. |
get_group_by_id(ref[, before]) | Looks up a GROUP element by the given ID. |
is_empty() | Returns True if this table doesn’t contain any real data because it was skipped over by the parser (through use of the table_number kwarg). |
to_xml(w, **kwargs) | |
iter_fields_and_params() | Recursively iterate over all FIELD and PARAM elements in the TABLE. |
get_field_by_id_or_name(ref[, before]) | Looks up a FIELD or PARAM element by the given ID or name. |
from_table(votable, table) | Create a Table instance from a given astropy.table.Table instance. |
Attributes Documentation
A list of Link objects (pointers to other documents or servers through a URI) for the table.
A list of parameters (constant-valued columns) for the table. Must contain only Param objects.
[required] The serialization format of the table. Must be one of:
Note that the ‘fits’ format, since it requires an external file, can not be written out. Any file read in with ‘fits’ format will be read out, by default, in ‘tabledata’ format.
A list of Group objects describing how the columns and parameters are grouped. Currently this information is only kept around for round-tripping and informational purposes.
Methods Documentation
Convert this VO Table to an astropy.table.Table instance.
Warning
Variable-length array fields may not be restored identically when round-tripping through the astropy.table.Table instance.
Looks up a FIELD or PARAM element by the given ID.
Recursively iterate over all GROUP elements in the TABLE.
Create a new array to hold the data based on the current set of fields, and store them in the array and member variable. Any data in the existing array will be lost.
nrows, if provided, is the number of rows to allocate.
Looks up a GROUP element by the given ID. Used by the group’s “ref” attribute
Returns True if this table doesn’t contain any real data because it was skipped over by the parser (through use of the table_number kwarg).
Recursively iterate over all FIELD and PARAM elements in the TABLE.
Looks up a FIELD or PARAM element by the given ID or name.
Create a Table instance from a given astropy.table.Table instance.