File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,26 @@ pub fn covar(y: PyExpr, x: PyExpr) -> PyExpr {
149
149
covar_samp ( y, x)
150
150
}
151
151
152
+ #[ pyfunction]
153
+ pub fn stddev ( expression : PyExpr , distinct : bool ) -> PyResult < PyExpr > {
154
+ let expr = functions_aggregate:: expr_fn:: stddev ( expression. expr ) ;
155
+ if distinct {
156
+ Ok ( expr. distinct ( ) . build ( ) ?. into ( ) )
157
+ } else {
158
+ Ok ( expr. into ( ) )
159
+ }
160
+ }
161
+
162
+ #[ pyfunction]
163
+ pub fn stddev_pop ( expression : PyExpr , distinct : bool ) -> PyResult < PyExpr > {
164
+ let expr = functions_aggregate:: expr_fn:: stddev_pop ( expression. expr ) ;
165
+ if distinct {
166
+ Ok ( expr. distinct ( ) . build ( ) ?. into ( ) )
167
+ } else {
168
+ Ok ( expr. into ( ) )
169
+ }
170
+ }
171
+
152
172
#[ pyfunction]
153
173
pub fn var_samp ( expression : PyExpr ) -> PyExpr {
154
174
functions_aggregate:: expr_fn:: var_sample ( expression. expr ) . into ( )
@@ -787,8 +807,6 @@ array_fn!(range, start stop step);
787
807
aggregate_function ! ( array_agg, ArrayAgg ) ;
788
808
aggregate_function ! ( max, Max ) ;
789
809
aggregate_function ! ( min, Min ) ;
790
- aggregate_function ! ( stddev, Stddev ) ;
791
- aggregate_function ! ( stddev_pop, StddevPop ) ;
792
810
aggregate_function ! ( stddev_samp, Stddev ) ;
793
811
aggregate_function ! ( var_pop, VariancePop ) ;
794
812
aggregate_function ! ( regr_avgx, RegrAvgx ) ;
You can’t perform that action at this time.
0 commit comments