Skip to content

Commit e101dd9

Browse files
topper-123jreback
authored andcommitted
CLN: remove __unicode__ from pyx files (#26416)
1 parent 241af3d commit e101dd9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pandas/_libs/tslibs/period.pyx

+2-6
Original file line numberDiff line numberDiff line change
@@ -2208,10 +2208,6 @@ cdef class _Period:
22082208
def now(cls, freq=None):
22092209
return Period(datetime.now(), freq=freq)
22102210

2211-
# HACK IT UP AND YOU BETTER FIX IT SOON
2212-
def __str__(self):
2213-
return self.__unicode__()
2214-
22152211
@property
22162212
def freqstr(self):
22172213
return self.freq.freqstr
@@ -2221,9 +2217,9 @@ cdef class _Period:
22212217
formatted = period_format(self.ordinal, base)
22222218
return "Period('%s', '%s')" % (formatted, self.freqstr)
22232219

2224-
def __unicode__(self):
2220+
def __str__(self):
22252221
"""
2226-
Return a unicode string representation for a particular DataFrame
2222+
Return a string representation for a particular DataFrame
22272223
"""
22282224
base, mult = get_freq_code(self.freq)
22292225
formatted = period_format(self.ordinal, base)

0 commit comments

Comments
 (0)