def get_freq_group(freq):
 if isinstance(freq, offsets.DateOffset):
  freq = freq.rule_code
 if isinstance(freq, compat.string_types):
  (base, mult) = get_freq_code(freq)
  freq = base
 elif isinstance(freq, int):
  pass
 else:
  raise ValueError('input must be str, offset or int')
 return ((freq // 1000) * 1000)

def get_freq_group ( freq ) : if isinstance ( freq , offsets . DateOffset ) : freq = freq . rule_code if isinstance ( freq , compat . string_types ) : ( base , mult ) = get_freq_code ( freq ) freq = base elif isinstance ( freq , int ) : pass else : raise ValueError ( 'input must be str, offset or int' ) return ( ( freq // 1000 ) * 1000 )
return frequency code group of given frequency str or offset .