diff --git a/crates/polars-core/src/series/ops/null.rs b/crates/polars-core/src/series/ops/null.rs index b5b8b4ad6362..40ef6a383dd6 100644 --- a/crates/polars-core/src/series/ops/null.rs +++ b/crates/polars-core/src/series/ops/null.rs @@ -89,7 +89,7 @@ impl Series { }, DataType::Null => Series::new_null(name, size), DataType::Unknown(kind) => { - let dtype = kind.materialize().expect("expected known type"); + let dtype = kind.materialize().unwrap_or(DataType::Null); Series::full_null(name, size, &dtype) }, #[cfg(feature = "object")]