-
Series.values
-
Return Series as ndarray or ndarray-like depending on the dtype
Returns: arr : numpy.ndarray or ndarray-like Examples
12>>> pd.Series([
1
,
2
,
3
]).values
array([
1
,
2
,
3
])
12>>> pd.Series(
list
(
'aabc'
)).values
array([
'a'
,
'a'
,
'b'
,
'c'
], dtype
=
object
)
123>>> pd.Series(
list
(
'aabc'
)).astype(
'category'
).values
[a, a, b, c]
Categories (
3
,
object
): [a, b, c]
Timezone aware datetime data is converted to UTC:
12345>>> pd.Series(pd.date_range(
'20130101'
, periods
=
3
,
tz
=
'US/Eastern'
)).values
array([
'2013-01-01T00:00:00.000000000-0500'
,
'2013-01-02T00:00:00.000000000-0500'
,
'2013-01-03T00:00:00.000000000-0500'
], dtype
=
'datetime64[ns]'
)
Series.values

2025-01-10 15:47:30
Please login to continue.