Skip to content

Commit aa57e8c

Browse files
author
Chang She
committed
BUG: replacing isinstance with com.is_integer in frequencies.py
1 parent f91e761 commit aa57e8c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/tseries/frequencies.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from pandas.tseries.offsets import DateOffset
77
from pandas.util.decorators import cache_readonly
88
import pandas.tseries.offsets as offsets
9+
import pandas.core.common as com
910
import pandas.lib as lib
1011

1112
class FreqGroup(object):
@@ -45,8 +46,8 @@ def get_freq_code(freqstr):
4546
freqstr = (get_offset_name(freqstr), freqstr.n)
4647

4748
if isinstance(freqstr, tuple):
48-
if (isinstance(freqstr[0], (int, long)) and
49-
isinstance(freqstr[1], (int, long))):
49+
if (com.is_integer(freqstr[0]) and
50+
com.is_integer(freqstr[1]))
5051
#e.g., freqstr = (2000, 1)
5152
return freqstr
5253
else:
@@ -59,7 +60,7 @@ def get_freq_code(freqstr):
5960
stride = freqstr[0]
6061
return code, stride
6162

62-
if isinstance(freqstr, (int, long)):
63+
if com.is_integer(freqstr):
6364
return (freqstr, 1)
6465

6566
base, stride = _base_and_stride(freqstr)

0 commit comments

Comments
 (0)