(self, view_dict)
return pd.DataFrame(result_list)
Returns a data frame from a view dict.

        Args:
            view_dict (dict): a dictionary containing information
                about the stored view.

        Returns:
            A pandas DataFrame with the results from a view aggregation.
Returns a data frame from a view dict.
Returns a data frame from a view dict .
def get_view(self, view_dict):
        """Returns a data frame from a view dict.

        Args:
            view_dict (dict): a dictionary containing information
                about the stored view.

        Returns:
            A pandas DataFrame with the results from a view aggregation.
        """
        view_id = view_dict.get('id')
        if not view_id:
            return pd.DataFrame()

        view = View.query.get(view_id)
        if not view:
            return pd.DataFrame()

        if not view.query_string and not view.query_dsl:
            return pd.DataFrame()

        query_filter = view.query_filter
        if query_filter and isinstance(query_filter, str):
            query_filter = json.loads(query_filter)
        elif not query_filter:
            query_filter = {'indices': '_all', 'size': 100}

        if view.query_dsl:
            query_dsl = json.loads(view.query_dsl)
        else:
            query_dsl = None

        sketch = Sketch.query.get_with_acl(self._sketch_id)
        sketch_indices = [
            t.searchindex.index_name
            for t in sketch.active_timelines
        ]

        results = self._datastore.search_stream(
            sketch_id=self._sketch_id,
            query_string=view.query_string,
            query_filter=query_filter,
            query_dsl=query_dsl,
            indices=sketch_indices,
        )
        result_list = [x.get('_source') for x in results]
        return pd.DataFrame(result_list)
def get_view ( self , view_dict ) : view_id = view_dict . get ( 'id' ) if not view_id : return pd . DataFrame ( ) view = View . query . get ( view_id ) if not view : return pd . DataFrame ( ) if not view . query_string and not view . query_dsl : return pd . DataFrame ( ) query_filter = view . query_filter if query_filter and isinstance ( query_filter , str ) : query_filter = json . loads ( query_filter ) elif not query_filter : query_filter = { 'indices' : '_all' , 'size' : 100 } if view . query_dsl : query_dsl = json . loads ( view . query_dsl ) else : query_dsl = None sketch = Sketch . query . get_with_acl ( self . _sketch_id ) sketch_indices = [ t . searchindex . index_name for t in sketch . active_timelines ] results = self . _datastore . search_stream ( sketch_id = self . _sketch_id , query_string = view . query_string , query_filter = query_filter , query_dsl = query_dsl , indices = sketch_indices , ) result_list = [ x . get ( '_source' ) for x in results ] return pd . DataFrame ( result_list )