pytuflow.GPKG2D.maximum#
- GPKG2D.maximum(locations, data_types, time_fmt='relative')#
Returns a DataFrame containing the maximum values for the given data types. The returned DataFrame will include time of maximum results as well.
It’s possible to pass in a well known shorthand for the data type e.g.
qforflow.The location can also be a filter string, e.g.
lineto extract the maximum values for all line geometries. The following filters are available for theGPKG2Dclass:None: default - returns all available timespoint:line:polygon: (orregion)
The returned DataFrame will have an index column corresponding to the location IDs, and the columns will be in the format
obj/data_type/[max|tmax], e.g.po/flow/max,po/flow/tmax- Parameters:
locations (str | list[str]) – The location to extract the maximum values for.
Nonewill return all locations for the given data_types.data_types (str | list[str]) – The data types to extract the maximum values for.
Nonewill return all data types for the given locations.time_fmt (str, optional) – The format for the time of max result. Options are
relativeorabsolute
- Returns:
The maximum, and time of maximum values
- Return type:
pd.DataFrame
Examples
Extracting the maximum flow for a given location:
>>> res = GPKG2D('path/to/plot_result_2D.gpkg') >>> res.maximum('po_line', 'flow') po/flow/max po/flow/tmax ds1 59.423 1.383333