File tree 1 file changed +20
-2
lines changed
1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,26 @@ pub fn covar(y: PyExpr, x: PyExpr) -> PyExpr {
150
150
covar_samp ( y, x)
151
151
}
152
152
153
+ #[ pyfunction]
154
+ pub fn stddev ( expression : PyExpr , distinct : bool ) -> PyResult < PyExpr > {
155
+ let expr = functions_aggregate:: expr_fn:: stddev ( expression. expr ) ;
156
+ if distinct {
157
+ Ok ( expr. distinct ( ) . build ( ) ?. into ( ) )
158
+ } else {
159
+ Ok ( expr. into ( ) )
160
+ }
161
+ }
162
+
163
+ #[ pyfunction]
164
+ pub fn stddev_pop ( expression : PyExpr , distinct : bool ) -> PyResult < PyExpr > {
165
+ let expr = functions_aggregate:: expr_fn:: stddev_pop ( expression. expr ) ;
166
+ if distinct {
167
+ Ok ( expr. distinct ( ) . build ( ) ?. into ( ) )
168
+ } else {
169
+ Ok ( expr. into ( ) )
170
+ }
171
+ }
172
+
153
173
#[ pyfunction]
154
174
pub fn var_samp ( expression : PyExpr ) -> PyExpr {
155
175
functions_aggregate:: expr_fn:: var_sample ( expression. expr ) . into ( )
@@ -817,8 +837,6 @@ array_fn!(range, start stop step);
817
837
aggregate_function ! ( array_agg, ArrayAgg ) ;
818
838
aggregate_function ! ( max, Max ) ;
819
839
aggregate_function ! ( min, Min ) ;
820
- aggregate_function ! ( stddev, Stddev ) ;
821
- aggregate_function ! ( stddev_pop, StddevPop ) ;
822
840
aggregate_function ! ( stddev_samp, Stddev ) ;
823
841
aggregate_function ! ( var_pop, VariancePop ) ;
824
842
aggregate_function ! ( regr_avgx, RegrAvgx ) ;
You can’t perform that action at this time.
0 commit comments