.. _funcindex: Index of functions per column type ================================== This is a list of the functions that can be applied on tables or columns, depending on the column type. Table functions ----------------- The following functions can be applies on any table, regardless of the types of columns it contains: **Methods** (e.g. ``table.shuffle()``) * :meth:`.CDataFrame.add_prefix` * :meth:`.CDataFrame.add_suffix` * :meth:`.CDataFrame.append` * :meth:`.CDataFrame.assign` * :meth:`.CDataFrame.describe` * :meth:`.CDataFrame.project` * :meth:`.CDataFrame.rename` * :meth:`.CDataFrame.sample` * :meth:`.CDataFrame.shuffle` * :meth:`.CDataFrame.slice` **Global functions** (e.g. ``cd.concat(table, table2)``): - :func:`.concat` - :func:`.remove_objects` Any column ---------- The following functions can be applied on any column, regardless of its type: **Table methods** - :meth:`.CDataFrame.filter` [1]_ **Column methods** (e.g. ``table["column_name"].as_table()``) * :meth:`.CSeries.as_table` * :meth:`.CSeries.astype` * :meth:`.CSeries.get` * :meth:`.CSeries.if_else` [1]_ * :meth:`.CSeries.with_threshold` * :meth:`.CSeriesColRef.as_table` * :meth:`.CSeriesColRef.count` Numeric column --------------- The following functions can be applied to any numeric column. The current column types are integer, nullable integer, integer vector and fixed point numbers. Integer column """"""""""""""""" These methods apply to integer columns: **Table methods** - :meth:`.CDataFrame.groupby` - :meth:`.CDataFrame.max` - :meth:`.CDataFrame.min` - :meth:`.CDataFrame.validate` **Column methods** * :meth:`.CSeriesColRef.in_range` * :meth:`.CSeriesColRef.max` * :meth:`.CSeriesColRef.mean` * :meth:`.CSeriesColRef.min` * :meth:`.CSeriesColRef.sum` * :meth:`.CSeriesColRef.sum_in_range` * :meth:`.CSeriesColRef.sum_squares` * :meth:`.CSeriesColRef.var` **Global functions** - :func:`.cut` - :func:`.merge` - :func:`.series_max` - :func:`.series_min` **Grouping functions** These functions require a ``GroupBy`` object (output by :meth:`.CDataFrame.groupby`) which only works for integer columns. Such object represents a grouped table. Performing the following **Grouping table methods** * :meth:`.CDataFrameGroupBy.as_table` * :meth:`.CDataFrameGroupBy.col` * :meth:`.CDataFrameGroupBy.size` **Grouping column methods** For the following methods, not only must the grouping be created for an integer column, but it can only be applied to an integer column - :meth:`.CSeriesGroupBy.agg` Given a table ``tab`` with an integer index ``int_index``, a column of ages ``age`` and one column with names ``name``: .. code:: python grouping = tab.groupby("int_index") # This works age_sum = grouping["age"].agg(cd.groupby.sum) # This does not name_sum = grouping["name"].agg(cd.groupby.sum) Integers or fixed-points """"""""""""""""""""""""""""""" .. versionadded:: 1.7 Fixed-point columns Constructing a :ref:`logistic` or :ref:`linear` regression model can be done with either integer or fixed-point columns using the following methods * :meth:`.crlearn.linear_model.LinearRegression.fit` (inherited from :class:`Ridge<.crlearn.linear_model.Ridge>`) * :meth:`.crlearn.linear_model.Ridge.fit` * :meth:`.crlearn.logistic_regression.LogisticRegression.fit` Column of vectors of integers """"""""""""""""""""""""""""""" **Column methods** * :meth:`.CSeries.inner` * :meth:`.CSeries.vsum` Column of nullable integers """"""""""""""""""""""""""""" **Table methods** - :meth:`.CDataFrame.fillna` **Column methods** * :meth:`.CSeries.fillna` * :meth:`.CSeries.isna` * :meth:`.CSeries.isnull` * :meth:`.CSeries.notna` * :meth:`.CSeries.notnull` String column --------------- **Column methods** * :meth:`.CSeries.len` * :meth:`.CSeries.lower` **Global functions** - :func:`.merge` [2]_ .. [1] These functions require a boolean column input but such input can be computed from a column of any type, e.g. ``tab["integer"] > 3`` or ``tab["string"] == "test"`` or simply ``tab["boolean"]``. .. [2] Except for ``how="left"`` as that requires a :class:`.CDataFrameGroupBy` that can only exist for integer columns.