hydromt_delft3dfm.workflows.update_data_columns_attributes#
- hydromt_delft3dfm.workflows.update_data_columns_attributes(branches: GeoDataFrame, attributes: DataFrame, brtype: str = None)[source]#
Add or update columns in the branches geodataframe.
UPdate is based on column and values in attributes (excluding 1st col branchtype used for query).
If brtype is set, only update the attributes of the specified type of branches.
- Parameters:
branches (gpd.GeoDataFrame) – Branches.
attribute (int or pd.DataFrame) – Values of the attribute. Either int of float for fixed value for all or a pd.DataFrame with values per “branchtype”, “shape” and “width” (column names of the DataFrame).
attribute_name (str) – Name of the new attribute column in branches.
- Returns:
branches – Branches with new attribute values.
- Return type:
gpd.GeoDataFrame