The following example illustrates the issue with the function infer_and_combine_levels():
>>> from lydata import load_datasets
>>> clb = next(load_datasets(year=2021, institution="clb"))
>>> clb.iloc[16].pathology.ipsi
Ia NaN
Ib False
II False
III True
IV False
V NaN
VII NaN
Name: 16, dtype: object
>>> infer_and_combine_levels(clb).iloc[16].pathology.ipsi
Ia False
Ib False
II False
III True
IV False
V NaN
VII NaN
I False
IIa False
IIb False
Va None
Vb None
Name: 16, dtype: object
Note how the involvement in LNL Ia was suddenly changed to False, although it is unknown.
The following example illustrates the issue with the function
infer_and_combine_levels():Note how the involvement in LNL
Iawas suddenly changed toFalse, although it is unknown.