teehr.JoinedTimeseriesTable#

class teehr.JoinedTimeseriesTable(ev)[source]#

Bases: TimeseriesTable

Access methods to joined timeseries table.

Methods

add_calculated_fields

Add calculated fields to the joined timeseries table.

create

Create joined timeseries table.

distinct_values

Return distinct values for a column.

field_enum

Get the joined timeseries fields enum.

fields

Return table columns as a list.

filter

Apply a filter.

load_csv

Import primary timeseries csv data.

load_fews_xml

Import timeseries from XML data format.

load_netcdf

Import primary timeseries netcdf data.

load_parquet

Import primary timeseries parquet data.

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 for Joined Timeseries.

to_sdf

Return PySpark DataFrame.

validate

Validate the dataset table against the schema.

write

Write the joined timeseries table to disk.

add_calculated_fields(cfs: CalculatedFieldBaseModel | List[CalculatedFieldBaseModel])[source]#

Add calculated fields to the joined timeseries table.

Note this does not persist the CFs to the table. It only applies them to the DataFrame. To persist the CFs to the table, use the write method.

Parameters:

cfs (Union[CalculatedFieldBaseModel, List[CalculatedFieldBaseModel]]) – The CFs to apply to the DataFrame.

Examples

>>> import teehr
>>> from teehr import RowLevelCalculatedFields as rcf
>>> ev.join_timeseries.add_calculated_fields([
>>>     rcf.Month()
>>> ]).write()
create(add_attrs: bool = False, execute_scripts: bool = False)[source]#

Create joined timeseries table.

Parameters:
  • execute_scripts (bool, optional) – Execute UDFs, by default False

  • add_attrs (bool, optional) – Add attributes, by default False

field_enum() JoinedTimeseriesFields[source]#

Get the joined timeseries fields enum.

to_geopandas()[source]#

Return GeoPandas DataFrame.

to_pandas()[source]#

Return Pandas DataFrame for Joined Timeseries.

write()[source]#

Write the joined timeseries table to disk.