Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scripting_function


Panel
titleDescription

Given a sequence of numerical values, estimates the percentile of input.

The percentile is a value on a scale that represents a percentage position in a list of data that can be equal to or below that value: i.e., the 25th percentile is a value below which 25% of observable data points may be found.

Client permissions restrictions


Panel
titleSyntax

system.math.percentile(values, percentile)

  • Parameters

List[Float] values - A sequence of numerical values. Accepts both integers and floats. The sequence may not contain None type values. However, passing a None type object instead of a sequence of numerical values will return NaN.

Float percentile - The percentile to compute. A float greater than 0 and less than or equal to 100. Will throw an exception if the percentile is out of bounds.

  • Returns

Float - An estimate of A value from the given list using the requested percentile of the input, or NaN if the input was empty or null.

  • Scope

Gateway, Vision Client, Perspective Session

Panel
titleCode Example
Code Block
languagepy
titleCode Snippet
# Create a list of values.
values = [3.5, 5.6, 7.4, 3.8]
  
# Print the 75th percentile.
print system.math.percentile(values, 75)
Panel
titleKeywords

system math percentile, math.percentile