From fd83e91070ed30972954503872d5e1f11d3a78f3 Mon Sep 17 00:00:00 2001 From: ritchie Date: Wed, 17 Apr 2024 16:34:13 +0200 Subject: [PATCH] failing tests [skip ci] --- py-polars/src/lazyframe/mod.rs | 49 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/py-polars/src/lazyframe/mod.rs b/py-polars/src/lazyframe/mod.rs index 64cc8cdc9232..b2d7a51c1f6c 100644 --- a/py-polars/src/lazyframe/mod.rs +++ b/py-polars/src/lazyframe/mod.rs @@ -938,58 +938,57 @@ impl PyLazyFrame { ldf.fill_nan(fill_value.inner).into() } - fn min(&self) -> PyResult { + fn min(&self) -> Self { let ldf = self.ldf.clone(); - let out = ldf.min().map_err(PyPolarsErr::from)?; - Ok(out.into()) + let out = ldf.min(); + out.into() } - fn max(&self) -> PyResult { + fn max(&self) -> Self { let ldf = self.ldf.clone(); - let out = ldf.max().map_err(PyPolarsErr::from)?; - Ok(out.into()) + let out = ldf.max(); + out.into() } - fn sum(&self) -> PyResult { + fn sum(&self) -> Self { let ldf = self.ldf.clone(); - let out = ldf.sum().map_err(PyPolarsErr::from)?; - Ok(out.into()) + let out = ldf.sum(); + out.into() } - fn mean(&self) -> PyResult { + fn mean(&self) -> Self { let ldf = self.ldf.clone(); - let out = ldf.mean().map_err(PyPolarsErr::from)?; - Ok(out.into()) + let out = ldf.mean(); + out.into() } - fn std(&self, ddof: u8) -> PyResult { + fn std(&self, ddof: u8) -> Self { let ldf = self.ldf.clone(); - let out = ldf.std(ddof).map_err(PyPolarsErr::from)?; - Ok(out.into()) + let out = ldf.std(ddof); + out.into() } - fn var(&self, ddof: u8) -> PyResult { + fn var(&self, ddof: u8) -> Self { let ldf = self.ldf.clone(); - let out = ldf.var(ddof).map_err(PyPolarsErr::from)?; - Ok(out.into()) + let out = ldf.var(ddof); + out.into() } - fn median(&self) -> PyResult { + fn median(&self) -> Self { let ldf = self.ldf.clone(); - let out = ldf.median().map_err(PyPolarsErr::from)?; - Ok(out.into()) + let out = ldf.median(); + out.into() } fn quantile( &self, quantile: PyExpr, interpolation: Wrap, - ) -> PyResult { + ) -> Self { let ldf = self.ldf.clone(); let out = ldf - .quantile(quantile.inner, interpolation.0) - .map_err(PyPolarsErr::from)?; - Ok(out.into()) + .quantile(quantile.inner, interpolation.0); + out.into() } fn explode(&self, column: Vec) -> Self {