Skip to main content
`Ctrl`+`K`

# pandas.Series.keys

Series.keys()

  Return alias for index.

  This method provides dictionary-like compatibility by returning the index of the Series, analogous to the keys of a dictionary.

  Returns:
    Index

      Index of the Series.

  See also

  `Series.index`

    The index (axis labels) of the Series.

  Examples

      >>> s = pd.Series([1, 2, 3], index=[0, 1, 2])
      >>> s.keys()
      Index([0, 1, 2], dtype='int64')