ATM Series[categorical].values
gives a Categorical and Series[sparse].values
gives a SparseArray. Interval, Period, and DatetimeTZ get cast to ndarray[object]. 3rd party EAs return the EA.
We should choose one or the other. I have no real preference which.
Comment From: TomAugspurger
This has been split into Series.array
for the extension array (or a no-copy wrapper around it for NumPy types) and Series.to_numpy()
for an ndarray. I believe the docs strongly recommend one of those over .values
.
I personally don't have a desire to deprecate .values
given the amount of code out there already using it, but don't have too strong of an objection if someone were to.
Comment From: jbrockmendel
so you're suggesting keeping the status quo and just encouraging people not to use .values? works for me
Comment From: jreback
why we do a DeprecationWarning in .values for a while?
Comment From: jorisvandenbossche
I personally don't really see much value in deprecating it. As Tom says, we decided before to add .array
for this purpose, and basically just left .values
for all the code out there that uses it.
People who don't want the .values
behaviour already have the alternatives available: .array
for the EA (or to_numpy
for specific numpy conversion).
Comment From: jbrockmendel
what if we (after deprecation cycle) make series.values just match ._values? i.e change Interval, Period, and DatetimeTZ to return the EAs, matching what we do for other EA dtypes