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.IntervalIndex.values.html below:

pandas.IntervalIndex.values — pandas 2.3.1 documentation

pandas.IntervalIndex.values#
property IntervalIndex.values[source]#

Return an array representing the data in the Index.

Warning

We recommend using Index.array or Index.to_numpy(), depending on whether you need a reference to the underlying data or a NumPy array.

Returns:
array: numpy.ndarray or ExtensionArray

See also

Index.array

Reference to the underlying data.

Index.to_numpy

A NumPy array representing the underlying data.

Examples

For pandas.Index:

>>> idx = pd.Index([1, 2, 3])
>>> idx
Index([1, 2, 3], dtype='int64')
>>> idx.values
array([1, 2, 3])

For pandas.IntervalIndex:

>>> idx = pd.interval_range(start=0, end=5)
>>> idx.values
<IntervalArray>
[(0, 1], (1, 2], (2, 3], (3, 4], (4, 5]]
Length: 5, dtype: interval[int64, right]

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