(self)
return pandas.DataFrame(entries)
Return a list of all available aggregators in the sketch.
Return a list of all available aggregators in the sketch.
Return a list of all available aggregators in the sketch .
def list_available_aggregators(self):
        """Return a list of all available aggregators in the sketch."""
        data = self.lazyload_data()
        meta = data.get('meta', {})
        always_supported = [{
            'parameter': 'index',
            'notes': (
                'List of indices or timeline IDS to limit the aggregation'),
            'type': 'text-input',
        }]

        entries = []
        for name, options in iter(meta.get('aggregators', {}).items()):
            for field in options.get('form_fields', []):
                entry = {
                    'aggregator_name': name,
                    'parameter': field.get('name'),
                    'notes': field.get('label')
                }
                if field.get('type') == 'ts-dynamic-form-select-input':
                    entry['value'] = '|'.join(field.get('options', []))
                    entry['type'] = 'selection'
                else:
                    _, _, entry['type'] = field.get('type').partition(
                        'ts-dynamic-form-')
                entries.append(entry)

            for entry_dict in always_supported:
                entry = copy.copy(entry_dict)
                entry['aggregator_name'] = name
                entries.append(entry)

        return pandas.DataFrame(entries)
def list_available_aggregators ( self ) : data = self . lazyload_data ( ) meta = data . get ( 'meta' , { } ) always_supported = [ { 'parameter' : 'index' , 'notes' : ( 'List of indices or timeline IDS to limit the aggregation' ) , 'type' : 'text-input' , } ] entries = [ ] for name , options in iter ( meta . get ( 'aggregators' , { } ) . items ( ) ) : for field in options . get ( 'form_fields' , [ ] ) : entry = { 'aggregator_name' : name , 'parameter' : field . get ( 'name' ) , 'notes' : field . get ( 'label' ) } if field . get ( 'type' ) == 'ts-dynamic-form-select-input' : entry [ 'value' ] = '|' . join ( field . get ( 'options' , [ ] ) ) entry [ 'type' ] = 'selection' else : _ , _ , entry [ 'type' ] = field . get ( 'type' ) . partition ( 'ts-dynamic-form-' ) entries . append ( entry ) for entry_dict in always_supported : entry = copy . copy ( entry_dict ) entry [ 'aggregator_name' ] = name entries . append ( entry ) return pandas . DataFrame ( entries )