Primary
Series.values ⚬|Documentation|1st|20251021203342-00-⌔
pandas.Series.values — pandas 2.3.3 documentation#pandas.Series.values
property
Series.valuesReturn Series as ndarray or ndarray-like depending on the dtype.
Warning: We recommend using
Series.arrayorSeries.to_numpy(), depending on whether you need a reference to the underlying data or a NumPy array.Returns:
- ✤ numpy.ndarray or ndarray-like
See also:
Series.arrayReference to the underlying data.
Series.to_numpyA NumPy array representing the underlying data.
Examples:
>>> pd.Series([1, 2, 3]).values array([1, 2, 3])>>> pd.Series(list("aabc")).values <ArrowStringArray> ['a', 'a', 'b', 'c'] Length: 4, dtype: str>>> pd.Series(list("aabc")).astype("category").values ['a', 'a', 'b', 'c'] Categories (3, str): ['a', 'b', 'c']Timezone aware datetime data is converted to UTC:
>>> pd.Series(pd.date_range("20130101", periods=3, tz="US/Eastern")).values array(['2013-01-01T05:00:00.000000', '2013-01-02T05:00:00.000000', '2013-01-03T05:00:00.000000'], dtype='datetime64[us]')Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original
Secondary
• • •