Skip to content

CLN: remove __unicode__ from pyx, etc. files #26416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions pandas/_libs/tslibs/period.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2208,10 +2208,6 @@ cdef class _Period:
def now(cls, freq=None):
return Period(datetime.now(), freq=freq)

# HACK IT UP AND YOU BETTER FIX IT SOON
def __str__(self):
return self.__unicode__()

@property
def freqstr(self):
return self.freq.freqstr
Expand All @@ -2221,9 +2217,9 @@ cdef class _Period:
formatted = period_format(self.ordinal, base)
return "Period('%s', '%s')" % (formatted, self.freqstr)

def __unicode__(self):
def __str__(self):
"""
Return a unicode string representation for a particular DataFrame
Return a string representation for a particular DataFrame
"""
base, mult = get_freq_code(self.freq)
formatted = period_format(self.ordinal, base)
Expand Down