picks the selected pandas.DataFrame
171106
def pick_summary_data(key, summary_df, selected_summaries):
    """"""

    selected_summaries_dict = create_selected_summaries_dict(selected_summaries)
    value = selected_summaries_dict[key]
    return summary_df.iloc[:, summary_df.columns.get_level_values(1) == value]
1320038
def get_selected_values(self, selection):
        """"""
        return [v for b, v in self._choices if b & selection]
1346812
def _makeMatchSelection(self, block, columnIndex, matched):
        
        selection = QTextEdit.ExtraSelection()

        if matched:
            bgColor = Qt.green
        else:
            bgColor = Qt.red

        selection.format.setBackground(bgColor)
        selection.cursor = QTextCursor(block)
        selection.cursor.setPosition(block.position() + columnIndex)
        selection.cursor.movePosition(QTextCursor.Right, QTextCursor.KeepAnchor)

        return selection
335221
def _update_selection(self, qindex1, qindex2):
        
        m = self.model()
        self._do_select(m.qindex2index(qindex1), m.qindex2index(qindex2))
556655
def select(self, **kws):
        '''
            
        '''
        lst = [i for i in self.values() if i.select(**kws)]

        random.shuffle(lst)

        return lst
458932
def selected_option(self):
        "  "
        i = 0
        for category in self.options:
            for o in category.options:
                if i == self.selected_option_index:
                    return o
                else:
                    i += 1
276617
def get_selected_python_frame(cls):
        ''''''
        frame = cls.get_selected_frame()

        while frame:
            if frame.is_evalframeex():
                return frame
            frame = frame.older()

        # Not found:
        return None
1138806
def pick(options, title=None, indicator='*', default_index=0, multi_select=False, min_selection_count=0, options_map_func=None):
    
    picker = Picker(options, title, indicator, default_index, multi_select, min_selection_count, options_map_func)
    return picker.start()
641242
def get_selected(self):
        
        if self.multi_select:
            return_tuples = []
            for selected in self.all_selected:
                return_tuples.append((self.options[selected], selected))
            return return_tuples
        else:
            return self.options[self.index], self.index
188012
def one_version(self, index=0):
        '''
        
        '''
        def prep(df):
            start = sorted(df._start.tolist())[index]
            return df[df._start == start]

        return pd.concat([prep(df) for _, df in self.groupby(self._oid)])
594024
def _X_selected(X, selected):
    """"""
    n_features = X.shape[1]
    ind = np.arange(n_features)
    sel = np.zeros(n_features, dtype=bool)
    sel[np.asarray(selected)] = True
    non_sel = np.logical_not(sel)
    n_selected = np.sum(sel)
    X_sel = X[:, ind[sel]]
    X_not_sel = X[:, ind[non_sel]]
    return X_sel, X_not_sel, n_selected, n_features
1242982
def selected(self):
        
        query_results = self.map(lambda el: el.is_selected(), 'selected').results
        if query_results:
            return all(query_results)
        return False
1005158
def selection(self, index):
        """"""
        self.update()
        self.isActiveWindow()
        self._parent.delete_btn.setEnabled(True)
693351
def operate_selected_rows(self, operator):
        '''
        '''
        model, tree_paths = self.selection.get_selected_rows()
        if not tree_paths:
            return
        fids = []
        for tree_path in tree_paths:
            fids.append(model[tree_path][FID_COL])
        for fid in fids:
            row = self.get_row_by_fid(fid)
            if row:
                operator(row)
296285
def get_selection(available, selection, base='/scif/apps'):
    ''''''

    if isinstance(selection, str):
        selection = selection.split(',')

    available = [os.path.basename(x) for x in available]
    selection = [os.path.basename(x) for x in selection]
    finalset = [x for x in selection if x in available]
    if len(finalset) == 0:
        bot.warning("No user experiments selected, providing all %s" %(len(available)))
        finalset = available
    return ["%s/%s" %(base,x) for x in finalset]
681690
def select_paths(cls, dataset, selection):
        
        return [s[0] for s in np.array([{0: p} for p in dataset.data])[selection]]
313584
def select(self, axis, index, force_copy: bool = False):
        """"""
        if axis == 0:
            if index == slice(None) and not force_copy:
                return self
            return self[index]
        else:
            raise ValueError("In Histogram1D.select(), axis must be 0.")