From 5df0ce27492df12d79a92ab444a39a05341d2f6d Mon Sep 17 00:00:00 2001 From: Alexander Beedie Date: Wed, 8 Feb 2023 12:45:52 +0400 Subject: [PATCH] fix(rust,python): return correct display/repr names for NaN-related expressions (#6721) --- polars/polars-lazy/polars-plan/src/dsl/function_expr/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/polars/polars-lazy/polars-plan/src/dsl/function_expr/mod.rs b/polars/polars-lazy/polars-plan/src/dsl/function_expr/mod.rs index fe49f9232588..e38f764c67ce 100644 --- a/polars/polars-lazy/polars-plan/src/dsl/function_expr/mod.rs +++ b/polars/polars-lazy/polars-plan/src/dsl/function_expr/mod.rs @@ -150,7 +150,11 @@ impl Display for FunctionExpr { #[cfg(all(feature = "rolling_window", feature = "moment"))] RollingSkew { .. } => "rolling_skew", ShiftAndFill { .. } => "shift_and_fill", - Nan(_) => "nan", + Nan(func) => match func { + NanFunction::IsNan => "is_nan", + NanFunction::IsNotNan => "is_not_nan", + NanFunction::DropNans => "drop_nans", + }, #[cfg(feature = "round_series")] Clip { min, max } => match (min, max) { (Some(_), Some(_)) => "clip",