# series_stats_dynamic()series_stats_dynamic()

`series_stats_dynamic()` 函数接受包含动态数值数组的列作为输入，并生成具有以下内容的动态值：The `series_stats_dynamic()` function takes a column containing dynamic numerical array as input and generates a dynamic value with the following content:

• `min`：输入数组中的最小值`min`: minimum value in the input array
• `min_idx`：输入数组中的最小值的第一个位置`min_idx`: first position of the minimum value in the input array
• `max`：输入数组中的最大值`max`: maximum value in the input array
• `max_idx`：输入数组中的最大值的第一个位置`max_idx`: first position of the maximum value in the input array
• `avg`：输入数组的平均值`avg`: average value of the input array
• `variance`：输入数组的样本方差`variance`: sample variance of input array
• `stdev`：输入数组的样本标准偏差`stdev`: sample standard deviation of the input array

## 语法Syntax

`series_stats_dynamic(`x `[,`ignore_nonfinite`])` `series_stats_dynamic(`x `[,`ignore_nonfinite`])`

## 参数Arguments

• x：动态数组单元格（数值数组）。x : Dynamic array cell which is an array of numeric values.
• ignore_nonfinite：布尔值（可选，默认值：`false`）标志，该标志指定是否在计算统计信息的同时忽略非有限值（null、NaN、inf 等）。ignore_nonfinite : Boolean (optional, default: `false`) flag that specifies whether to calculate the statistics while ignoring non-finite values ( null , NaN , inf , etc.). 如果设置为 `false`，则返回的结果为 `null`（如果数组中存在非有限值）。If set to `false` the returned result is `null` if non-finite values are present in the array.

## 示例Example

``````print x=dynamic([23,46,23,87,4,8,3,75,2,56,13,75,32,16,29])
| project stats=series_stats_dynamic(x)
``````
statsstats
{"min":2.0, "min_idx":8, "max":87.0, "max_idx":3, "avg":32.8, "stdev":28.503633853548269, "variance":812.45714285714291 }{"min": 2.0, "min_idx": 8, "max": 87.0, "max_idx": 3, "avg": 32.8, "stdev": 28.503633853548269, "variance": 812.45714285714291 }