(x, key)
| 252 | """ |
| 253 | |
| 254 | def _is_index_level_reference(x, key): |
| 255 | return ( |
| 256 | x.index.name is not None |
| 257 | and (np.isscalar(key) or isinstance(key, tuple)) |
| 258 | and key == x.index.name |
| 259 | and key not in getattr(x, "columns", ()) |
| 260 | ) |
| 261 | |
| 262 | if isinstance(columns_or_index, list): |
| 263 | return any(_is_index_level_reference(df, n) for n in columns_or_index) |
no outgoing calls
no test coverage detected