Skip to content

Add support for NaN equality within Arrays #27

Closed

Description

@mitches-got-glitches

When trying to assert_df_equality with allow_nan_equality=True, if the both DataFrames hold an array that contains some nan values then the comparer fails, even if the nans are in the same place.

An additional check should take place here to compare the array elements.

if allow_nan_equality:
for key in d1.keys() & d2.keys():
if not(nan_safe_equality(d1[key], d2[key])):
return False
return True

Again, I can help contribute to this one but it won't be until next week.

Here's a comparison example:

image

Activity

  1. MrPowers commented on Apr 22, 2021

    @MrPowers
    Owner

    Yes, this would be a good addition, and no rush, whenever you get around to it! Thanks so much for the help!!

  2. mitches-got-glitches commented on May 10, 2021

    @mitches-got-glitches
    ContributorAuthor

    Hi @MrPowers , just a note to say I have a pull request on this sitting ready to go. I branched off the changes on #29 though because it made sense to get that one through first. I'm just wondering what your timeline might be for a further review of the impact of #29? Some of the features would be useful to me currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions