pytuflow.LP2D.time_series#
- LP2D.time_series(locations, data_types, time_fmt='relative', *args, **kwargs)#
Returns a time-series DataFrame for the given location(s) and data type(s). The
time_series()method is only applicable for points along the 2d_lp line.The returned column names will be in the format
obj/data_type/locatione.g.point/water level/<label>_<distance>_pnt0.- Parameters:
locations (str | list[str]) – The location to extract the time series data for. If
Noneis passed in, all locations will be returned for the given data_types.data_types (str | list[str]) – The data type to extract the time series data for. If
Noneis passed in, all data types will be returned for the given locations.time_fmt (str, optional) – The format for the time column. Options are
relativeorabsolute.
- Returns:
The time series data.
- Return type:
pd.DataFrame
Examples
>>> lp = LP2D('/path/to/model_LP_NAME_H.csv') >>> id_ = lp.ids()[0] # get the first available ID for demonstration >>> print(id_) EG02_012_LP_01_2.07_pnt0 >>> df = lp.time_series(id_, 'water level') point/water level/EG02_012_LP_01_2.07_pnt0 time 0.0000 44.135 0.0167 44.135 0.0333 44.135 0.0500 44.135 0.0667 44.135 ... ... 2.9333 48.583 2.9500 48.570 2.9667 48.556 2.9833 48.543 3.0000 48.530