Skip to content

Commit 3e1ee5e

Browse files
committed
fix rebase scerwup
1 parent 9502f90 commit 3e1ee5e

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

pandas/core/arrays/datetimelike.py

-38
Original file line numberDiff line numberDiff line change
@@ -744,44 +744,6 @@ def map(self, mapper):
744744

745745
return Index(self).map(mapper).array
746746

747-
def value_counts(self, dropna=False):
748-
"""
749-
Return a Series containing counts of unique values.
750-
751-
Parameters
752-
----------
753-
dropna : boolean, default True
754-
Don't include counts of NaT values.
755-
756-
Returns
757-
-------
758-
Series
759-
"""
760-
# n.b. moved from PeriodArray.value_counts
761-
from pandas import Series, Index
762-
763-
if dropna:
764-
values = self[~self.isna()]._data
765-
else:
766-
values = self._data
767-
768-
cls = type(self)
769-
770-
result = value_counts(values, sort=False, dropna=dropna)
771-
index = Index(cls(result.index, dtype=self.dtype),
772-
name=result.index.name)
773-
return Series(result.values, index=index, name=result.name)
774-
775-
def map(self, mapper):
776-
# TODO(GH-23179): Add ExtensionArray.map
777-
# Need to figure out if we want ExtensionArray.map first.
778-
# If so, then we can refactor IndexOpsMixin._map_values to
779-
# a standalone function and call from here..
780-
# Else, just rewrite _map_infer_values to do the right thing.
781-
from pandas import Index
782-
783-
return Index(self).map(mapper).array
784-
785747
# ------------------------------------------------------------------
786748
# Null Handling
787749

0 commit comments

Comments
 (0)