Skip to content

Commit 578a37b

Browse files
author
Chang She
committed
BUG: using 'E'.encode('ascii') instead of b'E' for Python25 compat
1 parent 6f63032 commit 578a37b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/tseries/period.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,9 @@ def __new__(cls, data=None,
529529
else:
530530
base1, mult1 = _gfc(data.freq)
531531
base2, mult2 = _gfc(freq)
532+
how = 'E'.encode('ascii') # Python 2.5 support
532533
data = lib.period_asfreq_arr(data.values, base1, mult1,
533-
base2, mult2, b'E')
534+
base2, mult2, how)
534535
else:
535536
if freq is None and len(data) > 0:
536537
freq = getattr(data[0], 'freq')

0 commit comments

Comments
 (0)