pytimber.LoggingDB.get_variable_stats

LoggingDB.get_variable_stats(pattern: Union[str, Iterable[str]], time_from: Union[str, datetime, datetime64, timedelta, int, int64, float], time_to: Union[str, datetime, datetime64, timedelta, int, int64, float], unix_time: bool = True) Dict[str, Statistics]

Gets variable statistics for the specified time range.

Parameters:
  • pattern – A pattern or list of names to search for variables

  • time_from – A time range lower bound in str, datetime, datetime64, int, int64.

  • time_to – A time range upper bound in str, datetime, datetime64, int, int64.

  • unix_time – format of time for MinTstamp and MaxTstamp. If true then represented as float otherwise datetime.

Returns:

  • MinTstamp: the earliest timestamp of data for the variable in the given time range.

  • MaxTstamp: the latest timestamp of data for the variable in the given time range.

  • ValueCount: the number of data points for the variable in the given time range.

  • MinValue: the minimum data value for the variable in the given time range.

  • MaxValue: the maximum data value for the variable in the given time range.

  • AvgValue: the average data value for the variable in the given time range.

  • StandardDeviationValue: the standard deviation of data values for the variable in the given time range.

Return type:

A dictionary mapping variable names to StatTuple objects containing the following statistics