hydromt_wflow.components.WflowTablesComponent#
Summary of Methods and Attributes#
Component class |
Methods |
Attributes |
|---|---|---|
|
- class WflowTablesComponent(model: Model, filename: str = '{name}.csv')[source]#
Bases:
TablesComponentWflow specific tables component.
- read(filename: str | None = None, **kwargs) None[source]#
Read tables at provided or default file path if none is provided.
- write(filename: str | None = None, **kwargs) None[source]#
Write tables at provided or default file path if none is provided.
- property data_catalog: DataCatalog#
Return the data catalog of the model this component is associated with.
- finish_write()#
Finish the write functionality after cleanup was called for all components in the model.
All DeferredFileClose objects can overwrite any lazy loaded files now.
- property model: Model#
Return the model object this component is associated with.
- property root: ModelRoot#
Return the root of the model this component is associated with.
- set(tables: DataFrame | Series | Dict[str, DataFrame | Series], name: str | None = None) None#
Add (a) table(s) <pandas.DataFrame> to model.
- Parameters:
tables (pandas.DataFrame, pandas.Series or dict) – Table(s) to add to model. Multiple tables can be added at once by passing a dict of tables.
name (str, optional) – Name of table, by default None. Required when tables is not a dict.