pylhc / omc3

Python 3 codes for beam optics measurements and corrections in circular particle accelerators

Home Page:https://pylhc.github.io/omc3/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pandas forward compatibility: .loc with missing labels

lmalina opened this issue · comments

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.

if also fixes #174