A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pandas.pydata.org/pandas-docs/stable/reference/api/../api/pandas.errors.IndexingError.html below:

pandas.errors.IndexingError — pandas 2.3.1 documentation

pandas.errors.IndexingError#
exception pandas.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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4