Skip to content

Display NaNs in StringVariable as "?"#6681

Merged
janezd merged 1 commit intobiolab:masterfrom
markotoplak:display-nans
Jan 5, 2024
Merged

Display NaNs in StringVariable as "?"#6681
janezd merged 1 commit intobiolab:masterfrom
markotoplak:display-nans

Conversation

@markotoplak
Copy link
Member

Issue

As @janezd noticed in #6670, "NaN" is displayed as it would have been a string in the DataTable.

Description of changes

Display "?" if pandas.isnull returns True.

Although we have been allowing None or NaN to appear in StringVariables for some time now, there are probably many bugs like this. As I was reading the code, it seems that we really assumed StringVariables to actually be, well, strings, when we wrote that code 10 years ago.

Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd self-assigned this Jan 5, 2024
@janezd janezd merged commit 6fec5d6 into biolab:master Jan 5, 2024
@markotoplak markotoplak deleted the display-nans branch July 4, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants