Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.errors.InvalidIndexError#

exceptionpandas.errors.InvalidIndexError[source]#

Exception raised when attempting to use an invalid index key.

Examples

>>>idx=pd.MultiIndex.from_product([["x","y"],[0,1]])>>>df=pd.DataFrame([[1,1,2,2],...[3,3,4,4]],columns=idx)>>>df    x       y    0   1   0   10   1   1   2   21   3   3   4   4>>>df[:,0]Traceback (most recent call last):InvalidIndexError:(slice(None, None, None), 0)

[8]ページ先頭

©2009-2025 Movatter.jp