Skip to main content
Version: 1.2.0

tabsdata.tableframe

concatCombine multiple TableFrames by stacking their rows.
emptyCreates an empty (no column - no row) TableFrame.
from_dictCreates tableframe from a dictionary, or None.
from_pandasCreates tableframe from a pandas dataframe, or None.
from_polarsCreates tableframe from a polars dataframe or lazyframe, or None.
litExpression for the given literal value.
TableFrame> Private Functions
TableFrame.assert_has_colsEnsures that the (non-system) columns in the TableFrame match the expected columns.
TableFrame.castCast columns to a new data type.
TableFrame.clearClears all rows of the TableFrame preserving the schema.
TableFrame.columns
TableFrame.dropDiscard columns from the TableFrame.
TableFrame.drop_nansDrop rows with NaN values.
TableFrame.drop_nullsDrop rows with null values.
TableFrame.emptyCreates an empty (no column - no row) TableFrame.
TableFrame.extract_as_columnsExtract a slice of rows from the table as a column-oriented dictionary.
TableFrame.extract_as_rowsExtract a slice of rows from the TableFrame as a list of dictionaries.
TableFrame.fill_nanReplace all NaN values in the TableFrame with the given value.
TableFrame.fill_nullReplace all null values in the TableFrame with the given value.
TableFrame.filterFilter the TableFrame based on the given predicates.
TableFrame.firstReturn a TableFrame with the first row.
TableFrame.first_rowReturn a tuple or dictionary with the first row, or None if no row.
TableFrame.from_dictCreates tableframe from a dictionary, or None.
TableFrame.from_pandasCreates tableframe from a pandas dataframe, or None.
TableFrame.from_polarsCreates tableframe from a polars dataframe or lazyframe, or None.
TableFrame.group_byPerform a group by on the TableFrame.
TableFrame.has_colsVerifies the presence of (non-system) columns in the TableFrame.
TableFrame.has_same_schemaVerifies if the schema of the current TableFrame is same than the provided TableFrame.
TableFrame.headReturn a TableFrame with the first n rows.
TableFrame.is_emptyChecks if a TableFrame has no rows.
TableFrame.itemReturns a scalar value if the TableFrame contains exactly one user column and one row.
TableFrame.joinJoin the TableFrame with another TableFrame.
TableFrame.lastReturn a TableFrame with the last row.
TableFrame.last_rowReturn a tuple or dictionary with the last row, or None if no row.
TableFrame.limitReturn a TableFrame with the first n rows.
TableFrame.renameRename columns from the TableFrame.
TableFrame.selectSelect column(s) from the TableFrame.
TableFrame.sliceReturn a TableFrame with a slice of the original TableFrame
TableFrame.sortSort the TableFrame by the given column(s) or expression(s).
TableFrame.tailReturn a TableFrame with the last n rows.
TableFrame.to_dictCreates a dictionary from this tableframe.
TableFrame.to_pandasCreates a pandas dataframe from this tableframe.
TableFrame.to_polars_dfCreates a polars dataframe from this tableframe.
TableFrame.to_polars_lfCreates a polars lazyframe from this tableframe.
TableFrame.uniqueDeduplicate rows from the TableFrame.
TableFrame.with_columnsAdd columns to the TableFrame.
to_dictCreates dictionary from a tableframe, or None.
to_pandasCreates pandas dataframe from a tableframe, or None.
to_polars_dfCreates polars dataframe from a tableframe, or None.
to_polars_lfCreates polars lazyframe from a tableframe, or None.

empty

def empty() -> TableFrame

Creates an empty (no column - no row) TableFrame.


from_dict

def from_dict(data: td_TableDictionary | None = None) -> TableFrame

Creates tableframe from a dictionary, or None. None produces as an empty (no column - no row) tableframe.

Parameters:

parameter
data

Input data.


from_pandas

def from_pandas(data: DataFrame | None = None) -> TableFrame

Creates tableframe from a pandas dataframe, or None. None produces as an empty (no column - no row) tableframe.

Parameters:

parameter
data

Input data.


from_polars

def from_polars(data: LazyFrame | DataFrame | None = None) -> TableFrame

Creates tableframe from a polars dataframe or lazyframe, or None. None produces as an empty (no column - no row) tableframe.

Parameters:

parameter
data

Input data.


to_dict

def to_dict(data: TableFrame) -> dict[str, list[Any]]

Creates dictionary from a tableframe, or None. None produces and empty (no key) dictionary.

Parameters:

parameter
data

Input data.


to_pandas

def to_pandas(data: TableFrame) -> DataFrame

Creates pandas dataframe from a tableframe, or None. None produces and empty (no column - no row) pandas dataframe.

Parameters:

parameter
data

Input data.


to_polars_df

def to_polars_df(data: TableFrame) -> DataFrame

Creates polars dataframe from a tableframe, or None. None produces and empty (no column - no row) polars dataframe.

Parameters:

parameter
data

Input data.


to_polars_lf

def to_polars_lf(data: TableFrame) -> LazyFrame

Creates polars lazyframe from a tableframe, or None. None produces and empty (no column - no row) polars lazyframe.

Parameters:

parameter
data

Input data.