Skip to content

Commit 8140ee1

Browse files
committed
Add _values_for_factorize in period.py
1 parent f817cad commit 8140ee1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/arrays/period.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,9 @@ def _check_timedeltalike_freq_compat(self, other):
814814
def _values_for_argsort(self):
815815
return self._data
816816

817+
def _values_for_factorize(self):
818+
return np.asarray(self), np.nan
819+
817820

818821
PeriodArray._add_comparison_ops()
819822

0 commit comments

Comments
 (0)