teehr.ConfigurationTable#

class teehr.ConfigurationTable(ev)[source]#

Bases: DomainTable

Access methods to configurations table.

Methods

add

Add a configuration domain to the evaluation.

distinct_values

Return distinct values for a column.

field_enum

Get the configuration fields enum.

fields

Return table columns as a list.

filter

Apply a filter.

order_by

Apply an order_by.

query

Run a query against the table with filters and order_by.

to_geopandas

Return GeoPandas DataFrame.

to_pandas

Return Pandas DataFrame.

to_sdf

Return PySpark DataFrame.

validate

Validate the dataset table against the schema.

add(configuration: Configuration | List[Configuration])[source]#

Add a configuration domain to the evaluation.

Parameters:

configuration (Union[Configuration, List[Configuration]]) – The configuration domain to add.

Example

>>> from teehr.models.domain_tables import Configuration
>>> configuration = Configuration(
>>>     name="usgs_observations",
>>>     type="primary",
>>>     description="USGS observations",
>>> )
>>> ev.load.add_configuration(configuration)
field_enum() ConfigurationFields[source]#

Get the configuration fields enum.