[BUG] loc
-based indexing of DataFrames silently discards missing keys if at least one key is present in indexer
#13379
Milestone
Describe the bug
When performing
loc
indexing of aDataFrame
, if one asks for a missing key, pandas raises aKeyError
. In constrast, cudf only does so if none of the requested keys are in the index. If at least one requested key is present then the subsetted data frame with that key is returned and the missing keys are silently dropped.Series
loc
indexing does the right thing here and raisesKeyError
if any keys are missing.Steps/Code to reproduce bug
Expected behavior
Should match pandas behaviour and raise
KeyError
.The text was updated successfully, but these errors were encountered: