是一个在数组、列表、DataFrame等数据结构操作中常见的错误,尤其是在使用Pandas等Python数据分析库时。这个错误表明你尝试使用过多的索引(indexer)来访问数据结构的元素,而该数据结构并不支持这种多级的索引方式。 2. 分析导致IndexingError: too many indexers的常见原因 错误的索引方式:在使用DataFrame或类似结构时,可能...
In this case I would have expected the 'too many indexers' error. Also when slicing the first levels, you get this error message: In [21]: s.loc[:, 'e'] ... IndexingError: Too many indexers which can be very misleading in a real-world use case with a large dataframe and points...