File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change 26
26
)
27
27
28
28
from pandas ._libs import (
29
- NA ,
30
29
NaT ,
31
30
algos as libalgos ,
32
31
index as libindex ,
@@ -2097,19 +2096,6 @@ def _validate_index_level(self, level) -> None:
2097
2096
)
2098
2097
2099
2098
else :
2100
- if level is NA :
2101
- raise KeyError (
2102
- "Requested level is pandas.NA, which is not a valid index name"
2103
- )
2104
- if level is NaT :
2105
- raise KeyError (
2106
- "Requested level is pandas.NaT, which is not a valid index name"
2107
- )
2108
- if isinstance (level , float ) and np .isnan (level ):
2109
- raise KeyError (
2110
- "Requested level is NaN, which is not a valid index name"
2111
- )
2112
-
2113
2099
if level != self .name :
2114
2100
raise KeyError (
2115
2101
f"Requested level ({ level } ) does not match index name ({ self .name } )"
You can’t perform that action at this time.
0 commit comments