hestia_earth.utils.lookup.get_table_value¶
-
hestia_earth.utils.lookup.get_table_value(array, col_match, col_match_with, col_val)[source]¶ Get a value matched by one or more columns from a numpy.recarray.
- Parameters
array (numpy.recarray) – The array returned by the load_lookup function.
col_match – Which column should be used to find data in. This will restrict the rows to search for. Can be a single str or a list of str. If a list is used, must be the same length as col_match_with.
col_match_with – Which column value should be used to find data in. This will restrict the rows to search for. Can be a single str or a list of str. If a list is used, must be the same length as col_match.
col_val (str) – The column which contains the value to look for.
- Returns
The value found or None if no match.
- Return type
str