You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There has been some discussion in #8162 and pandas2#17 about making Index behave more like a regular Series or DataFrame column(s). Is there a consensus towards moving in that direction? In particular, I'm thinking about:
DatetimeIndex, PeriodIndex, TimedeltaIndex could have a property dt that returns self. Then users can access foo.dt without having to check whether foo is a Series or Index.
Less obvious so more of an implied question: Index.map seems to behave a lot like Series.apply and less like Series.map. Any reason not to alias Index.apply = Index.map?
Related Index/MultiIndex compat, a non-multi Index could have self.levels = [self], so users can iterate over levels without pre-checking.
The text was updated successfully, but these errors were encountered:
I would rather add to the previous issues rather than creating a new one. Further there already is an issue w.r.t. .map/.apply. see if you can link to it.
There has been some discussion in #8162 and pandas2#17 about making
Index
behave more like a regular Series or DataFrame column(s). Is there a consensus towards moving in that direction? In particular, I'm thinking about:DatetimeIndex
,PeriodIndex
,TimedeltaIndex
could have a propertydt
that returnsself
. Then users can accessfoo.dt
without having to check whetherfoo
is aSeries
orIndex
.If
StringAccessorMixin
is deprecated (which can be done with a tiny subset of WIP: Refactor accessors, unify usage, make "recipe" #17042),Index
can have_accessors
,_dir_deletions
, and_dir_additions
copy/pasted fromSeries
.Less obvious so more of an implied question:
Index.map
seems to behave a lot likeSeries.apply
and less likeSeries.map
. Any reason not to aliasIndex.apply = Index.map
?Related Index/MultiIndex compat, a non-multi Index could have
self.levels = [self]
, so users can iterate over levels without pre-checking.The text was updated successfully, but these errors were encountered: