pandas.Index.to_list

Index.to_list()[source]

Return a list of the values.

These are each a scalar type, which is a Python scalar (for str, int, float) or a pandas scalar (for Timestamp/Timedelta/Interval/Period)

Returns
list

See also

numpy.ndarray.tolist

Return the array as an a.ndim-levels deep nested list of Python scalars.

© 2008–2021, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.3.4/reference/api/pandas.Index.to_list.html