QueryResponseTable#
- class sunpy.net.base_client.QueryResponseTable(
- data=None,
- masked=False,
- names=None,
- dtype=None,
- meta=None,
- copy=True,
- rows=None,
- copy_indices=True,
- units=None,
- descriptions=None,
- **kwargs,
Bases:
QTableA class to represent tables of heterogeneous data.
QTableprovides a class for heterogeneous tabular data which can be easily modified, for instance adding columns or new rows.The
QTableclass is identical toTableexcept that columns with an associatedunitattribute are converted toQuantityobjects.For more information see:
- Parameters:
data (numpy ndarray, dict, list, table-like object, optional) – Data to initialize table.
masked (bool, optional) – Specify whether the table is masked.
names (list, optional) – Specify column names.
dtype (list, optional) – Specify column data types.
meta (dict, optional) – Metadata associated with the table.
copy (bool, optional) – Copy the input data. If the input is a (Q)Table the
metais always copied regardless of thecopyparameter. Default is True.rows (numpy ndarray, list of list, optional) – Row-oriented data for table instead of
dataargument.copy_indices (bool, optional) – Copy any indices in the input data. Default is True.
units (list, dict, optional) – List or dict of units to apply to columns.
descriptions (list, dict, optional) – List or dict of descriptions to apply to columns.
**kwargs (dict, optional) – Additional keyword args when converting table-like object.
Attributes Summary
Descriptor to define a custom attribute for a Table subclass.
Descriptor to define a custom attribute for a Table subclass.
Descriptor to define a custom attribute for a Table subclass.
Descriptor to define a custom attribute for a Table subclass.
Methods Summary
Returns all the names that can be used to format filenames.
show(*cols)Return a table with only
colspresent.Returns the total size of all files in a query.
Modify this table so that all columns are displayed.
Attributes Documentation
- client#
Descriptor to define a custom attribute for a Table subclass.
The value of the
TableAttributewill be stored in a dict named__attributes__that is stored in the tablemeta. The attribute can be accessed and set in the usual way, and it can be provided when creating the object.Defining an attribute by this mechanism ensures that it will persist if the table is sliced or serialized, for example as a pickle or ECSV file.
See the
MetaAttributedocumentation for additional details.- Parameters:
default (object) – Default value for attribute
Examples
>>> from astropy.table import Table, TableAttribute >>> class MyTable(Table): ... identifier = TableAttribute(default=1) >>> t = MyTable(identifier=10) >>> t.identifier 10 >>> t.meta {'__attributes__': {'identifier': 10}}
- display_keys#
Descriptor to define a custom attribute for a Table subclass.
The value of the
TableAttributewill be stored in a dict named__attributes__that is stored in the tablemeta. The attribute can be accessed and set in the usual way, and it can be provided when creating the object.Defining an attribute by this mechanism ensures that it will persist if the table is sliced or serialized, for example as a pickle or ECSV file.
See the
MetaAttributedocumentation for additional details.- Parameters:
default (object) – Default value for attribute
Examples
>>> from astropy.table import Table, TableAttribute >>> class MyTable(Table): ... identifier = TableAttribute(default=1) >>> t = MyTable(identifier=10) >>> t.identifier 10 >>> t.meta {'__attributes__': {'identifier': 10}}
- errors#
Descriptor to define a custom attribute for a Table subclass.
The value of the
TableAttributewill be stored in a dict named__attributes__that is stored in the tablemeta. The attribute can be accessed and set in the usual way, and it can be provided when creating the object.Defining an attribute by this mechanism ensures that it will persist if the table is sliced or serialized, for example as a pickle or ECSV file.
See the
MetaAttributedocumentation for additional details.- Parameters:
default (object) – Default value for attribute
Examples
>>> from astropy.table import Table, TableAttribute >>> class MyTable(Table): ... identifier = TableAttribute(default=1) >>> t = MyTable(identifier=10) >>> t.identifier 10 >>> t.meta {'__attributes__': {'identifier': 10}}
- hide_keys#
Descriptor to define a custom attribute for a Table subclass.
The value of the
TableAttributewill be stored in a dict named__attributes__that is stored in the tablemeta. The attribute can be accessed and set in the usual way, and it can be provided when creating the object.Defining an attribute by this mechanism ensures that it will persist if the table is sliced or serialized, for example as a pickle or ECSV file.
See the
MetaAttributedocumentation for additional details.- Parameters:
default (object) – Default value for attribute
Examples
>>> from astropy.table import Table, TableAttribute >>> class MyTable(Table): ... identifier = TableAttribute(default=1) >>> t = MyTable(identifier=10) >>> t.identifier 10 >>> t.meta {'__attributes__': {'identifier': 10}}
- size_column = None#
Methods Documentation
- path_format_keys()[source]#
Returns all the names that can be used to format filenames.
Each one corresponds to a single column in the table, and the format syntax should match the dtype of that column, i.e. for a
Timeobject or aQuantity.
- show(*cols)[source]#
Return a table with only
colspresent.If no
colsare specified, all columns will be shown, including any hidden by default.This differs slightly from
QueryResponseTable[cols]as it allows keys which are not in the table to be requested.