pytuflow.GPKG2D.times#
- GPKG2D.times(filter_by=None, fmt='relative')#
Returns all the available times for the given filter.
The
filter_by
is an optional argument that can be used to filter the return further.Available filters for theGPKG2D
class are:None
: default - returns all available timespoint
:line
:polygon
: (orregion
)[id]
: returns only data types for the given ID.[data_type]
: returns only data types for the given data type. Shorthand data type names can be used.
- Parameters:
filter_by (str, optional) – The string to filter the times by.
fmt (str, optional) – The format for the times. Options are
relative
orabsolute
.
- Returns:
The available times in the requested format.
- Return type:
list[TimeLike]
Examples
>>> res = GPKG2D('path/to/plot_result_2D.gpkg') >>> res.times() [0.0, 0.016666666666666666, ..., 3.0] >>> res.times(fmt='absolute') [Timestamp('2021-01-01 00:00:00'), Timestamp('2021-01-01 00:01:00'), ..., Timestamp('2021-01-01 03:00:00')]