def setup(self):

        if self.attributes['label'].columns is None:
            self.attributes['label'].setup(data=self._data.source,
                                           columns=self._data.df.columns[0])

        # handle input options where values were provided in simple or pre-aggregated
        # format
        if self.values.selection is None:

            # identify data that was indexed by a groupby operation and setup data/label
            # after this transformation, the rest of the chart is processed as if the
            # inputs were provided as column labels
            if not all([name is None for name in self._data.df.index.names]):
                label_cols = list(self._data.df.index.names)
                self._data._data.reset_index(inplace=True)
                self.attributes['label'].setup(data=self._data.source,
                                               columns=label_cols)

                # find remaining column for pre-aggregated data
                cols = [col for col in self._data.df.columns if col not in
                        label_cols + ['index']]

            # when there is 'index' selection for label, use remaining column as label
            # if the remaining column is an object
            elif self.attributes['label'].columns[0] == 'index':
                cols = [col for col in self._data.df.columns if ['index'] not in col]
            else:
                cols = self.attributes['label'].columns

            # setup our selection
            self.values.selection = cols[0]

            if self._data.df[self.values.selection].dtype.name == 'object':
                self.attributes['label'].setup(data=self._data.source,
                                               columns=cols[0])
                self.agg = 'count'

        # infer color specification and stacking
        if self.attributes['color'].columns is None:
            self.attributes['color'].setup(data=self._data.source,
                                           columns=self.attributes['label'].columns[0])

        if self.attributes['stack'].columns is None:
            self.attributes['stack'].setup(data=self._data.source,
                                           columns=self.attributes['label'].columns[0])
dataset/ETHPy150Open bokeh/bokeh/bokeh/charts/builders/donut_builder.py/DonutBuilder.setup/swapped operands of `not in`