CDCgov / cfa-viral-lineage-model

Apache License 2.0
10 stars 0 forks source link

Assertions to check dataframe joins #24

Open thanasibakis opened 2 months ago

thanasibakis commented 2 months ago

Checking the results of a join can be a lifesaver for otherwise cryptic bugs, even if that's just that the result should be an m x n table, so you assert res.shape = (expected_rows, expected_columns).

_Originally posted by @afmagee42 in https://github.com/CDCgov/cfa-viral-lineage-model/pull/15#discussion_r1711995886_

thanasibakis commented 2 months ago

I like this idea, but while implementing it, I learned that LazyFrames don't have shape, and I don't know if it's worth collecting the object in memory just to perform this check?