tabsdata.tableframe
concat | Combine multiple TableFrames by stacking their rows. |
empty | Creates an empty (no column - no row) TableFrame. |
from_dict | Creates tableframe from a dictionary, or None. |
from_pandas | Creates tableframe from a pandas dataframe, or None. |
from_polars | Creates tableframe from a polars dataframe or lazyframe, or None. |
lit | Expression for the given literal value. |
TableFrame | > Private Functions |
TableFrame.assert_has_cols | Ensures that the (non-system) columns in the TableFrame match the expected columns. |
TableFrame.cast | Cast columns to a new data type. |
TableFrame.clear | Clears all rows of the TableFrame preserving the schema. |
TableFrame.columns | |
TableFrame.drop | Discard columns from the TableFrame. |
TableFrame.drop_nans | Drop rows with NaN values. |
TableFrame.drop_nulls | Drop rows with null values. |
TableFrame.empty | Creates an empty (no column - no row) TableFrame. |
TableFrame.extract_as_columns | Extract a slice of rows from the table as a column-oriented dictionary. |
TableFrame.extract_as_rows | Extract a slice of rows from the TableFrame as a list of dictionaries. |
TableFrame.fill_nan | Replace all NaN values in the TableFrame with the given value. |
TableFrame.fill_null | Replace all null values in the TableFrame with the given value. |
TableFrame.filter | Filter the TableFrame based on the given predicates. |
TableFrame.first | Return a TableFrame with the first row. |
TableFrame.first_row | Return a tuple or dictionary with the first row, or None if no row. |
TableFrame.from_dict | Creates tableframe from a dictionary, or None. |
TableFrame.from_pandas | Creates tableframe from a pandas dataframe, or None. |
TableFrame.from_polars | Creates tableframe from a polars dataframe or lazyframe, or None. |
TableFrame.group_by | Perform a group by on the TableFrame. |
TableFrame.has_cols | Verifies the presence of (non-system) columns in the TableFrame. |
TableFrame.has_same_schema | Verifies if the schema of the current TableFrame is same than the provided TableFrame. |
TableFrame.head | Return a TableFrame with the first n rows. |
TableFrame.is_empty | Checks if a TableFrame has no rows. |
TableFrame.item | Returns a scalar value if the TableFrame contains exactly one user column and one row. |
TableFrame.join | Join the TableFrame with another TableFrame. |
TableFrame.last | Return a TableFrame with the last row. |
TableFrame.last_row | Return a tuple or dictionary with the last row, or None if no row. |
TableFrame.limit | Return a TableFrame with the first n rows. |
TableFrame.rename | Rename columns from the TableFrame. |
TableFrame.select | Select column(s) from the TableFrame. |
TableFrame.slice | Return a TableFrame with a slice of the original TableFrame |
TableFrame.sort | Sort the TableFrame by the given column(s) or expression(s). |
TableFrame.tail | Return a TableFrame with the last n rows. |
TableFrame.to_dict | Creates a dictionary from this tableframe. |
TableFrame.to_pandas | Creates a pandas dataframe from this tableframe. |
TableFrame.to_polars_df | Creates a polars dataframe from this tableframe. |
TableFrame.to_polars_lf | Creates a polars lazyframe from this tableframe. |
TableFrame.unique | Deduplicate rows from the TableFrame. |
TableFrame.with_columns | Add columns to the TableFrame. |
to_dict | Creates dictionary from a tableframe, or None. |
to_pandas | Creates pandas dataframe from a tableframe, or None. |
to_polars_df | Creates polars dataframe from a tableframe, or None. |
to_polars_lf | Creates 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: Mapping[str, Sequence[object] | Mapping[str, Sequence[object]]] | None = None,
) -> TableFrame
Creates tableframe from a dictionary, or None.
None produces as an empty (no column - no row) tableframe.
Parameters:
dataInput 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:
dataInput 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:
dataInput 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:
dataInput 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:
dataInput 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:
dataInput 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:
dataInput data.