pytuflow.LP2D.section#
- LP2D.section(locations, data_types, time, *args, **kwargs)#
Returns a DataFrame containing the long plot data for the given location(s) and data type(s).
The returned DataFrame will have the following columns:
branch_id: The ID of the branch (nodestring) that the data is from (forLP2D.section()calls this will always be zero).node_string: The name of the nodestring.offset: The offset along the nodestring.data_type: The data type (e.g. water level).
- Parameters:
locations (str | list[str]) – The location to extract the long plot data for (i.e. the nodestring names).
data_types (str | list[str]) – The data types to extract the long plot data for.
time (TimeLike) – The time to extract the long plot data for.
- Returns:
The long plot data.
- Return type:
pd.DataFrame
Examples
>>> lp = LP2D('/path/to/model_LP_NAME_H.csv') >>> lp.section('model_LP_NAME', 'h', 1.) offset branch_id node_string h 0 2.07 0 EG02_012_LP_01 49.862 1 8.31 0 EG02_012_LP_01 49.860 2 14.55 0 EG02_012_LP_01 49.873 3 20.79 0 EG02_012_LP_01 49.148 4 27.03 0 EG02_012_LP_01 46.414 5 33.28 0 EG02_012_LP_01 47.090 6 39.52 0 EG02_012_LP_01 47.094 7 45.77 0 EG02_012_LP_01 47.072 8 52.02 0 EG02_012_LP_01 47.040