Seeking terseness in order to keep my @testset readable.
In this particular @test, query responses (as DataFrames) need to be checked for accuracy.
There has to be a better way to do this:
response = DataFrame(:a=>["a",missing],:g=>["a",missing])
actual = DataFrame(:a=>["a",missing],:g=>["a",missing])
@test actual[:a][(!ismissing).(actual[:a])] == response[:a][(!ismissing).(actual[:a])]
&& actual[:g][(!ismissing).(actual[:g])] == response[:g][(!ismissing).(actual[:g])]
I’m looking for something like the following, such that equality of non-missing values in all columns (:a, :g , etc) are checked without the columns themselves being listed explicitly
notmissing = !ismissing.(actual)
@test all(actual[notmissing] .== response[notmissing])
Edit: added multiple columns and corrected syntax on !ismissing