Only the columns contained in the DataFrame returned by the
        wrapped function. (No registered columns included.)
482065
def local_columns(self):
        
        if self._columns:
            return self._columns
        else:
            self._call_func()
            return self._columns
1213445
def get_column(self, col):
        
        # catch corner case with an empty file (group with no datasets)
        if not len(self.group.keys()):
            return np.array([])
        vals = self.group[col]
        if self.filter_func:
            return vals[self.mask]
        else:
            return vals[:]
656412
def _getColumnList(self):
        
        columnList = []
        for columnName in self.columnNames:
            column = self.columns[columnName]
            type = column.getType()
            if type is None:
                type = 'text'
            columnList.append(
                {u'name': columnName,
                 u'type': type.decode('ascii')})
        return columnList
1269768
def columns_used(self):
        
        return list(tz.unique(tz.concatv(
            util.columns_in_filters(self.fit_filters),
            util.columns_in_filters(self.predict_filters),
            util.columns_in_formula(self.model_expression))))
443140
def cols_(df,col_list,func,*args,**kwargs):
    
    return _pd.DataFrame({col_name:func(df,col_name,*args,**kwargs) for col_name in col_list})
980437
def _get_group_dataframes(self):
        
        if isinstance(self.data, GroupedDataFrame):
            grouper = self.data.groupby()
            # groupby on categorical columns uses the categories
            # even if they are not present in the data. This
            # leads to empty groups. We exclude them.
            return (gdf for _, gdf in grouper if not gdf.empty)
        else:
            return (self.data, )
1283620
def get_columns_of_table(self, table=None):
        """"""
        # Check the table exists #
        if table is None: table = self.main_table
        if not table in self.tables: return []
        # A PRAGMA statement will implicitly issue a commit, don't use #
        self.own_cursor.execute('SELECT * from "%s" LIMIT 1;' % table)
        columns = [x[0] for x in self.own_cursor.description]
        self.cursor.fetchall()
        return columns
244214
def parse_columns(lines):
    
    data = []
    index = []
    for line in lines:
        line = line.rstrip()
        if line.startswith("#"):
            tmp = __parse_entry(line)
            data.append(tmp[1])
            index.append(tmp[0])

    return DataFrame(data, index=index, columns=['description'])
436022
def return_obj(cols, df, return_cols=False):
        """"""
        df_holder = DataFrameHolder(cols=cols, df=df)
        return df_holder.return_self(return_cols=return_cols)
895674
def filter_(self, columns, value):
        

        for column in columns:
            if column not in self.data.columns:
                raise ValueError("Column %s not in DataFrame columns: %s" % (column, list(self.data)))

        for column in columns:
            # Filtering on empty data series doesn't make sense at all and also would raise an error
            column_len = len(self.data[column])
            if column_len > 0 and column_len != self.data[column].isnull().sum():
                self.data = self.data[self.data[column] != value]

        return self.data
894412
def _get_column_names(self):
        
        column_names = set()
        for column in self.df:
            column_names.add(column)
        for column in self.unmaterialized_cols:
            column_names.add(column)
        return list(column_names)
546326
def stats(self, columns):
        
        assert (not isinstance(columns, basestring)), "columns should be a " \
                                                      "list of strs,  " \
                                                      "not a str!"
        assert isinstance(columns, list), "columns should be a list!"

        from pyspark.sql import functions as F
        functions = [F.min, F.max, F.avg, F.count]
        aggs = list(
            self._flatmap(lambda column: map(lambda f: f(column), functions),
                          columns))
        return PStats(self.from_schema_rdd(self._schema_rdd.agg(*aggs)))
1084176
def row(self, columnnames=[], exclude=False):
        
        from .tablerow import tablerow
        return tablerow(self, columnnames, exclude)
798062
def get_column_names(self, X):
        
        if isinstance(X, pd.DataFrame):
            return X.columns

        return range(X.shape[1])
95424
def cols_(self) -> pd.DataFrame:
        
        try:
            s = self.df.iloc[0]
            df = pd.DataFrame(s)
            df = df.rename(columns={0: "value"})

            def run(row):
                t = row[0]
                return type(t).__name__

            s = df.apply(run, axis=1)
            df = df.rename(columns={0: "value"})
            df["types"] = s
            return df
        except Exception as e:
            self.err(e)
278190
def dataframe(self):
        
        # If both the runs scored and allowed are None, the game hasn't been
        # played yet, and the DataFrame should be None.
        if self._runs_allowed is None and self._runs_scored is None:
            return None
        fields_to_include = {
            'attendance': self.attendance,
            'boxscore_index': self.boxscore_index,
            'date': self.date,
            'datetime': self.datetime,
            'game_number_for_day': self.game_number_for_day,
            'day_or_night': self.day_or_night,
            'game': self.game,
            'game_duration': self.game_duration,
            'games_behind': self.games_behind,
            'innings': self.innings,
            'location': self.location,
            'loser': self.loser,
            'opponent_abbr': self.opponent_abbr,
            'rank': self.rank,
            'record': self.record,
            'result': self.result,
            'runs_allowed': self.runs_allowed,
            'runs_scored': self.runs_scored,
            'save': self.save,
            'streak': self.streak,
            'winner': self.winner
        }
        return pd.DataFrame([fields_to_include], index=[self._boxscore])
503249
def components(self):
        
        from pandas import DataFrame

        columns = ['days', 'hours', 'minutes', 'seconds',
                   'milliseconds', 'microseconds', 'nanoseconds']
        hasnans = self._hasnans
        if hasnans:
            def f(x):
                if isna(x):
                    return [np.nan] * len(columns)
                return x.components
        else:
            def f(x):
                return x.components

        result = DataFrame([f(x) for x in self], columns=columns)
        if not hasnans:
            result = result.astype('int64')
        return result