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:
TableThe table read from the file.
- Raises:
PydlutilsExceptionIf
tablenameis not set.KeyErrorIf
tablenamedoes not exist in the file.