read_table_yanny¶
- pydl.pydlutils.yanny.read_table_yanny(filename, tablename=None)[source]¶
Read a yanny file into a
Table
.Because yanny files can contain multiple tables, it is necessary to specify the table name to return. However, all “headers” (keyword-value pairs) will be included in the Table metadata.
This function is for use with
register_reader()
.- Parameters
- filename
str
Name of the file to read.
- tablename
str
The name of the table to read from the file.
- filename
- Returns
Table
The table read from the file.
- Raises
PydlutilsException
If
tablename
is not set.KeyError
If
tablename
does not exist in the file.