ResSimpy.Utils.obj_to_table_string.to_table_line
- ResSimpy.Utils.obj_to_table_string.to_table_line(obj: SupportsKeywordMapping, headers: list[str]) str[source]
Takes a generic Nexus object and returns the attribute values as a string in the order of headers provided. Requires an implemented to_dict method and get_keyword_mapping() method.
- Parameters:
obj (Any) – a NexusObject with a to_dict and get_keyword_mapping method.
headers (list[str]) – list of header values in Nexus keyword format
- Returns:
string of the values in the order of the headers provided.