(raw_data, period_override, resampling=False)
return (data, period, granularity)
Generates a tuple consisting of processed input data, a calculated or overridden period, and granularity

      raw_data : pandas DataFrame
        input data
      period_override : int
        period specified in the anomaly_detect_ts parameter list, None if it is not provided
      resampling : True | False
        indicates whether the raw_data should be resampled to a supporting granularity, if applicable
Generates a tuple consisting of processed input data, a calculated or overridden period, and granularity
Generates a tuple consisting of processed input data a calculated or overridden period and granularity
def _get_data_tuple(raw_data, period_override, resampling=False):
    """
    Generates a tuple consisting of processed input data, a calculated or overridden period, and granularity

      raw_data : pandas DataFrame
        input data
      period_override : int
        period specified in the anomaly_detect_ts parameter list, None if it is not provided
      resampling : True | False
        indicates whether the raw_data should be resampled to a supporting granularity, if applicable
    """
    data = raw_data.sort_index()
    timediff = _get_time_diff(data)

    if timediff.days > 0:
        period = _get_period(7, period_override)
        granularity = 'day'
    elif timediff.seconds / 60 / 60 >= 1:
        granularity = 'hr'
        period = _get_period(24, period_override)
    elif timediff.seconds / 60 >= 1:
        granularity = 'min'
        period = _get_period(1440, period_override)
    elif timediff.seconds > 0:
        granularity = 'sec'
    elif timediff.seconds > 0:
        granularity = 'sec'

        '''
           Aggregate data to minute level of granularity if data stream granularity is sec and
           resampling=True. If resampling=False, raise ValueError
        '''
        if resampling is True:
            period = _resample_to_min(data, period_override)
        else:
            _handle_granularity_error('sec')
    else:
        '''
           Aggregate data to minute level of granularity if data stream granularity is ms and
           resampling=True. If resampling=False, raise ValueError
        '''
        if resampling is True:
            data, period = _resample_to_min(data, period_override)
            granularity = None
        else:
            _handle_granularity_error('ms')

    return (data, period, granularity)
def _get_data_tuple ( raw_data , period_override , resampling = False ) : data = raw_data . sort_index ( ) timediff = _get_time_diff ( data ) if timediff . days > 0 : period = _get_period ( 7 , period_override ) granularity = 'day' elif timediff . seconds / 60 / 60 >= 1 : granularity = 'hr' period = _get_period ( 24 , period_override ) elif timediff . seconds / 60 >= 1 : granularity = 'min' period = _get_period ( 1440 , period_override ) elif timediff . seconds > 0 : granularity = 'sec' elif timediff . seconds > 0 : granularity = 'sec' '''
           Aggregate data to minute level of granularity if data stream granularity is sec and
           resampling=True. If resampling=False, raise ValueError
        ''' if resampling is True : period = _resample_to_min ( data , period_override ) else : _handle_granularity_error ( 'sec' ) else : '''
           Aggregate data to minute level of granularity if data stream granularity is ms and
           resampling=True. If resampling=False, raise ValueError
        ''' if resampling is True : data , period = _resample_to_min ( data , period_override ) granularity = None else : _handle_granularity_error ( 'ms' ) return ( data , period , granularity )