Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.errors.IndexingError#

exceptionpandas.errors.IndexingError[source]#

Exception is raised when trying to index and there is a mismatch in dimensions.

Examples

>>>df=pd.DataFrame({'A':[1,1,1]})>>>df.loc[...,...,'A']...# IndexingError: indexer may only contain one '...' entry>>>df=pd.DataFrame({'A':[1,1,1]})>>>df.loc[1,...,...]...# IndexingError: Too many indexers>>>df[pd.Series([True],dtype=bool)]...# IndexingError: Unalignable boolean Series provided as indexer...>>>s=pd.Series(range(2),...index=pd.MultiIndex.from_product([["a","b"],["c"]]))>>>s.loc["a","c","d"]...# IndexingError: Too many indexers

[8]ページ先頭

©2009-2025 Movatter.jp