Skip to main content
`Ctrl`+`K`

# pandas.Series.list.__getitem__

Series.list.__getitem__(key)

  Index or slice lists in the Series.

  Retrieves elements at the given integer index or slice from each list in the Series, returning a new Series with the selected values.

  Parameters:
    key int | slice

      Index or slice of indices to access from each list.

  Returns:
    pandas.Series

      The list at requested index.

  See also

  `ListAccessor.flatten`

    Flatten list values.

  Examples

      >>> import pyarrow as pa
      >>> s = pd.Series(
      ...     [
      ...         [1, 2, 3],
      ...         [3],
      ...     ],
      ...     dtype=pd.ArrowDtype(pa.list_(pa.int64())),
      ... )
      >>> s.list[0]
      0    1
      1    3
      dtype: int64[pyarrow]