EdgeTable¶
- class edge_pydb.EdgeTable(file='', path='', cols=None, data=None, masked=None, names=None, dtype=None, meta=None, copy=True, rows=None, copy_indices=True, **kwargs)[source]¶
Bases:
TableDefinition of the EdgeTable class. An EdgeTable is a regular Astropy table in either ECSV or HDF5 format.
- Parameters:
- filestr
Name of the file. This is generally NOT a full path, as the package maintains a list of available tables. The name should end with .csv or .hdf5. Use ‘list’ to provide a listing of available tables.
- pathstr
Name of the path within the file, for HDF5 files only. If not given, a list of available paths is output.
- colslist of str
A list of columns to read in. Other columns are discarded.
Methods Summary
join(table[, join_type, keys])read(file[, path])Read and parse a data table and return as a Table.
Methods Documentation
- read(file, path='')[source]¶
Read and parse a data table and return as a Table.
This function provides the Table interface to the astropy unified I/O layer. This allows easily reading a file in many supported data formats using syntax such as:
>>> from astropy.table import Table >>> dat = Table.read('table.dat', format='ascii') >>> events = Table.read('events.fits', format='fits')
Get help on the available readers for
Tableusing the``help()`` method:>>> Table.read.help() # Get help reading Table and list supported formats >>> Table.read.help('fits') # Get detailed help on Table FITS reader >>> Table.read.list_formats() # Print list of available formats
See also: https://docs.astropy.org/en/stable/io/unified.html
- Parameters:
- *argstuple, optional
Positional arguments passed through to data reader. If supplied the first argument is typically the input filename.
- formatstr
File format specifier.
- unitslist, dict, optional
List or dict of units to apply to columns
- descriptionslist, dict, optional
List or dict of descriptions to apply to columns
- **kwargsdict, optional
Keyword arguments passed through to data reader.
- Returns:
- out
Table Table corresponding to file contents
- out
Notes
The available built-in formats are:
Format
Read
Write
Auto-identify
Deprecated
ascii
Yes
Yes
No
ascii.aastex
Yes
Yes
No
ascii.basic
Yes
Yes
No
ascii.cds
Yes
No
No
ascii.commented_header
Yes
Yes
No
ascii.csv
Yes
Yes
Yes
ascii.daophot
Yes
No
No
ascii.ecsv
Yes
Yes
Yes
ascii.fast_basic
Yes
Yes
No
ascii.fast_commented_header
Yes
Yes
No
ascii.fast_csv
Yes
Yes
No
ascii.fast_no_header
Yes
Yes
No
ascii.fast_rdb
Yes
Yes
No
ascii.fast_tab
Yes
Yes
No
ascii.fixed_width
Yes
Yes
No
ascii.fixed_width_no_header
Yes
Yes
No
ascii.fixed_width_two_line
Yes
Yes
No
ascii.html
Yes
Yes
Yes
ascii.ipac
Yes
Yes
No
ascii.latex
Yes
Yes
Yes
ascii.mrt
Yes
Yes
No
ascii.no_header
Yes
Yes
No
ascii.qdp
Yes
Yes
Yes
ascii.rdb
Yes
Yes
Yes
ascii.rst
Yes
Yes
No
ascii.sextractor
Yes
No
No
ascii.tab
Yes
Yes
No
ascii.tdat
Yes
Yes
Yes
fits
Yes
Yes
Yes
hdf5
Yes
Yes
Yes
pandas.csv
Yes
Yes
No
pandas.fwf
Yes
No
No
pandas.html
Yes
Yes
No
pandas.json
Yes
Yes
No
parquet
Yes
Yes
Yes
parquet.votable
Yes
Yes
No
pyarrow.csv
Yes
No
No
votable
Yes
Yes
Yes
votable.parquet
Yes
Yes
No
aastex
Yes
Yes
No
Yes
cds
Yes
No
No
Yes
csv
Yes
Yes
No
Yes
daophot
Yes
No
No
Yes
ecsv
Yes
Yes
No
Yes
html
Yes
Yes
No
Yes
ipac
Yes
Yes
No
Yes
latex
Yes
Yes
No
Yes
mrt
Yes
Yes
No
Yes
rdb
Yes
Yes
No
Yes
Deprecated format names like
aastexwill be removed in a future version. Use the full name (e.g.ascii.aastex) instead.