diff --git a/crates/polars-ops/src/series/ops/horizontal.rs b/crates/polars-ops/src/series/ops/horizontal.rs index 739330ad0aed..deb71f44e736 100644 --- a/crates/polars-ops/src/series/ops/horizontal.rs +++ b/crates/polars-ops/src/series/ops/horizontal.rs @@ -350,7 +350,10 @@ pub fn mean_horizontal( // All remaining must be numeric (or null). for col in &columns[first_non_null_idx + 1..] { let dtype = col.dtype(); - if !(dtype.is_numeric() + if !ignore_nulls && dtype == &DataType::Null { + // The presence of a single null column guarantees the output is all-null. + return null_with_supertype(columns, true); + } else if !(dtype.is_numeric() || dtype.is_decimal() || dtype.is_bool() || dtype.is_temporal()