Skip to content

Commit

Permalink
series column name was missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Romano Vacca committed Sep 30, 2023
1 parent 29f55ab commit 0577e99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/polars-core/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion py-polars/tests/unit/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 0577e99

Please sign in to comment.