You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/moonblade/aggs.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,12 +48,12 @@ the number of nodes in a graph represented by a CSV edge list.
48
48
-**mode**(*\<expr\>*) -> `string`: Value appearing the most, breaking ties arbitrarily in favor of the first value in lexicographical order.
49
49
-**most_common**(*k*, *\<expr\>*, *separator?*) -> `string`: List of top k most common values returned by expression joined by a pipe character ('|') or by the provided separator. Ties will be broken by lexicographical order.
50
50
-**most_common_counts**(*k*, *\<expr\>*, *separator?*) -> `string`: List of top k most common counts returned by expression joined by a pipe character ('|') or by the provided separator. Ties will be broken by lexicographical order.
51
-
-**percentage**(*\<expr\>*) -> `string`: Return the percentage of truthy values returned by expression.
51
+
-**percentage**(*\<expr\>*, *decimals?*) -> `string`: Return the percentage of truthy values returned by expression, up to an optional number of decimal places.
52
52
-**quantile**(*\<expr\>*, *q*) -> `number`: Return the desired quantile of numerical values.
53
53
-**q1**(*\<expr\>*) -> `number`: Return the first quartile of numerical values.
54
54
-**q2**(*\<expr\>*) -> `number`: Return the second quartile of numerical values.
55
55
-**q3**(*\<expr\>*) -> `number`: Return the third quartile of numerical values.
56
-
-**ratio**(*\<expr\>*) -> `number`: Return the ratio of truthy values returned by expression.
56
+
-**ratio**(*\<expr\>*, *decimals?*) -> `number`: Return the ratio of truthy values returned by expression, up to an optional number of decimal places.
57
57
-**rms**(*\<expr\>*) -> `number`: Return the Root Mean Square of numerical values.
58
58
-**stddev**(*\<expr\>*) -> `number`: Population standard deviation. Same as `stddev_pop`.
59
59
-**stddev_pop**(*\<expr\>*) -> `number`: Population standard deviation. Same as `stddev`.
Copy file name to clipboardExpand all lines: docs/moonblade/window.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,8 @@
3
3
-**cummax**(*\<expr\>*) -> `number`: Returns the cumulative maximum of the numbers yielded by given expression.
4
4
-**cummin**(*\<expr\>*) -> `number`: Returns the cumulative minimum of the numbers yielded by given expression.
5
5
-**cumsum**(*\<expr\>*) -> `number`: Returns the cumulative sum of the numbers yielded by given expression.
6
+
-**dense_rank**(*\<expr\>*) -> `number`: Returns the dense rank (there will be no gaps, but ties remain possible for a same rank) of numbers yielded by given expression. Beware, as this requires buffering whole file or group.
7
+
-**frac**(*\<expr\>*, *decimals?*) -> `number`: Returns the fraction represented by numbers yielded by given expression over the total sum of them. Beware, as this requires buffering whole file or group.
6
8
-**lag**(*\<expr\>*, *steps?*, *\<expr\>?*) -> `any`: Returns a value yielded by given expression, lagged by n steps or 1 step by default. Can take a second expression after the number of steps to return a default value for rows that come before first lagged value.
7
9
-**lead**(*\<expr\>*, *steps?*, *\<expr\>?*) -> `any`: Returns a value yielded by given expression, leading by n steps or 1 step by default. Can take a second expression after the number of steps to return a default value for rows that come after last lead value.
8
10
-**rolling_avg**(*window_size*, *\<expr\>*) -> `number`: Returns the rolling average in given window size of numbers yielded by given expression. Same as `rolling_mean`.
Copy file name to clipboardExpand all lines: src/moonblade/doc/window.json
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,18 @@
17
17
"returns": "number",
18
18
"help": "Returns the cumulative sum of the numbers yielded by given expression."
19
19
},
20
+
{
21
+
"name": "dense_rank",
22
+
"arguments": ["<expr>"],
23
+
"returns": "number",
24
+
"help": "Returns the dense rank (there will be no gaps, but ties remain possible for a same rank) of numbers yielded by given expression. Beware, as this requires buffering whole file or group."
25
+
},
26
+
{
27
+
"name": "frac",
28
+
"arguments": ["<expr>", "decimals?"],
29
+
"returns": "number",
30
+
"help": "Returns the fraction represented by numbers yielded by given expression over the total sum of them. Beware, as this requires buffering whole file or group."
0 commit comments