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:
QTable
A class to represent tables of heterogeneous data.
QTable
provides a class for heterogeneous tabular data which can be easily modified, for instance adding columns or new rows.The
QTable
class is identical toTable
except that columns with an associatedunit
attribute are converted toQuantity
objects.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
meta
is always copied regardless of thecopy
parameter. Default is True.rows (numpy ndarray, list of list, optional) – Row-oriented data for table instead of
data
argument.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.
Methods Summary
Returns all the names that can be used to format filenames.
show
(*cols)Return a table with only
cols
present.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
TableAttribute
will 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
MetaAttribute
documentation 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 OrderedDict([('__attributes__', {'identifier': 10})])
- display_keys#
Descriptor to define a custom attribute for a Table subclass.
The value of the
TableAttribute
will 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
MetaAttribute
documentation 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 OrderedDict([('__attributes__', {'identifier': 10})])
- hide_keys#
Descriptor to define a custom attribute for a Table subclass.
The value of the
TableAttribute
will 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
MetaAttribute
documentation 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 OrderedDict([('__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
Time
object or aQuantity
.
- show(*cols)[source]#
Return a table with only
cols
present.If no
cols
are 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.