From 0577e99f251820c66f536de6754027aa84b97271 Mon Sep 17 00:00:00 2001 From: Romano Vacca Date: Mon, 25 Sep 2023 13:08:55 +0200 Subject: [PATCH] series column name was missing --- crates/polars-core/src/fmt.rs | 2 +- py-polars/tests/unit/test_constructors.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/polars-core/src/fmt.rs b/crates/polars-core/src/fmt.rs index abfb29a5410c..97fed1703701 100644 --- a/crates/polars-core/src/fmt.rs +++ b/crates/polars-core/src/fmt.rs @@ -359,7 +359,7 @@ impl Debug for Series { "Series" ), DataType::Null => { - format_nullarray!(f, self.len(), "nullarray", "null", "Series") + format_nullarray!(f, self.len(), "nullarray", self.name(), "Series") }, DataType::Binary => { format_array!(f, self.binary().unwrap(), "binary", self.name(), "Series") diff --git a/py-polars/tests/unit/test_constructors.py b/py-polars/tests/unit/test_constructors.py index 3fcb47d7db03..aa3ae6d0ebc7 100644 --- a/py-polars/tests/unit/test_constructors.py +++ b/py-polars/tests/unit/test_constructors.py @@ -613,7 +613,7 @@ def test_nullarray_print_format() -> None: assert df_null.schema == {"a": pl.Null} assert df_null.rows() == [(None,), (None,)] - expected_string = "shape: (2,)\nSeries: 'null' [nullarray]\n[\n\tnull\n\tnull\n]" + expected_string = "shape: (2,)\nSeries: 'a' [nullarray]\n[\n\tnull\n\tnull\n]" assert str(df_null["a"]) == expected_string