Pandas forward compatibility: .loc with missing labels
Created by: lmalina
pandas.DataFrame.loc
with missing labels (index or column) raises KeyError in pandas > 1.0.0. Before only warning was issued. In occasions when we willingly use it. It should be changed to .reindex
and fill_value=numpy.nan
. The reason for filling the missing values explicitly is to avoid pandas.NA, which is experimental for the moment.