You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the row and/or column labels are not present in the DataFrame, the lookup() method returns ... whatever it wants, apparently. I would expect either a NaN or an exception, personally - but whatever the result, it shouldn't be the wrong piece of data.
Indexing lookup returns -1 for non-existing label, which is then used to "wrap around" per python array indexing semantics. Probably should have check in lookup function:
if (ridx == -1).any():
raise ValueError("Bad row label(s)")
if (cidx == -1).any():
raise ValueError("Bad col label(s)")
If the row and/or column labels are not present in the DataFrame, the lookup() method returns ... whatever it wants, apparently. I would expect either a NaN or an exception, personally - but whatever the result, it shouldn't be the wrong piece of data.
The text was updated successfully, but these errors were encountered: