Closed gsheni closed 2 months ago
get_cardinality_distribution
child_column.value_counts(dropna=True)
test_utils.py
parent_column = pd.Series([1, 2, 3, 4, 5]) child_column = pd.Series([3, 4, 1, 4, 4, 5, 1, np.nan, np.nan])
parent child_counts 0 1 2.0 1 2 0.0 2 3 1.0 3 4 3.0 4 5 1.0 5 np.nan 2.0
Problem Description
get_cardinality_distribution
does not take into account NaN foreign keys (in the child column).Expected behavior
get_cardinality_distribution
child_column.value_counts(dropna=True)
, taking into account NaNstest_utils.py
Example