Skip to main content
Version: 1.7.1

tabsdata.tableframe.expr.expr

deprecated_category
ErrorCode
Expr
Expr.absReturn the abso lute value of the expression.
Expr.addEquivalent to the + operator.
Expr.aliasSet the name for a column or expression.
Expr.and_Bitwise and operator with the given expressions.
Expr.arccosCalculate the inverse cosine of the element value.
Expr.arccoshCalculate the inverse hyperbolic cosine of the element value.
Expr.arcsinCalculate the inverse sine of the element value.
Expr.arcsinhCalculate the inverse hyperbolic sine of the element value.
Expr.arctanCalculate the inverse tangent of the element value.
Expr.arctanhCalculate the inverse hyperbolic tangent of the element value.
Expr.castCast a value to d different type.
Expr.cbrtCalculate the cub root of the element value.
Expr.ceilRound up the expression to the next integer value.
Expr.clipFor element values outside the lower and upper bounds, lower values are replaced with the lower bound and upper values with the upper bound.
Expr.cosCalculate the cosine of the element value.
Expr.coshCalculate the hyperbolic cosine of the element value.
Expr.cotCalculate the cotangent of the element value.
Expr.countAggregation operation that counts the non null values of the given column in the group.
Expr.degreesConvert a radian value to degrees
Expr.diffCompute the difference between an element value and the element value of the specified relative row.
Expr.eqCompare if 2 expressions are equal, equivalent to expr == other.
Expr.eq_missingCompare if 2 expressions are equal an, equivalent to expr == other.
Expr.expCalculate the exponential of the element value.
Expr.fill_nanReplace NaN values with the given value.
Expr.fill_nullReplace null values with the given value.
Expr.filterApply a filter predicate to an expression.
Expr.firstGet the first element.
Expr.floorRound down the expression to the previous integer value.
Expr.floordivCalculate the floor on the division.
Expr.geGreater or equal operator.
Expr.gtGreater than operator.
Expr.hashCompute the hash of an element value.
Expr.is_betweenIf an expression is between the given bounds.
Expr.is_finiteIf an element value is finite.
Expr.is_inIf an element value is in the given collection.
Expr.is_infiniteIf an element value is infinite.
Expr.is_nanIf an element value is NaN.
Expr.is_not_nanIf an element value is not NaN.
Expr.is_not_nullIf an element value is not null (None).
Expr.is_nullIf an element value is null (None).
Expr.is_uniqueIf an element value is unique for all values in the column.
Expr.lastGet the last element.
Expr.leLess or equal operator.
Expr.lenAggregation operation that counts the rows in the group.
Expr.logCalculate the logarithm to the given base.
Expr.log10Calculate the logarithm base 10.
Expr.log1pCalculate the natural logarithm plus one.
Expr.ltLess than operator.
Expr.maxAggregation operation that finds the maximum value in the group.
Expr.meanAggregation operation that finds the mean of the values in the group.
Expr.medianAggregation operation that finds the median of the values in the group.
Expr.minAggregation operation that finds the minimum value in the group.
Expr.modModulus operator.
Expr.mulMultiplication operator.
Expr.n_uniqueAggregation operation that counts the unique values of the given column in the group.
Expr.neCompare if 2 expressions are not equal, equivalent to expr != other.
Expr.ne_missingCompare if 2 expressions are not equal an, equivalent to expr != other.
Expr.negUnary minus operator.
Expr.not_Negate a boolean expression.
Expr.or_Bitwise or operator with the given expressions.
Expr.powExponentiation operator.
Expr.radiansConvert a degree value to radians
Expr.rankCompute the rank of the element values.
Expr.reinterpretReinterpret the 64bit element values (i64 or u64) as a signed/unsigned integers.
Expr.roundRound floating point element values.
Expr.round_sig_figsRound floating point element values to the specified significant figures.
Expr.shrink_dtypeCast down a column to the smallest type that can hold the element values.
Expr.signCalculate the sign of element values.
Expr.sinCalculate the sine of the element value.
Expr.sinhCalculate the hyperbolic sine of the element value.
Expr.sliceCompute a slice of the TableFrame for the specified columns.
Expr.sqrtCalculate the square root of the element value.
Expr.subEquivalent to the - operator.
Expr.sumAggregation operation that sums the values in the group.
Expr.tanCalculate the tangent of the element value.
Expr.tanhCalculate the hyperbolic tangent of the element value.
Expr.truedivEquivalent to the float / operator.
Expr.xorBitwise xor operator with the given expression.
expr_resolves_to_multiple_outputs
TableFrameErrorException raised when handling a TableFrame.

deprecated_category

def deprecated_category(
reason: str,
replacement: str | None = None,
since: str | None = None,
) -> type[TabsdataDeprecatedWarning]

ErrorCode

class ErrorCode(*args, **kwds)

Bases: Enum


Expr

class Expr(expr: Expr | Expr)

property
dtExprDateTimeNameSpace

:categories: type_casting

Return an object namespace with all date-time methods for a date-time value.

property
strExprStringNameSpace

:categories: type_casting

Return an object namespace with all string methods for a string value.

floordiv
def floordiv(other: Any) -> Expr

Calculate the floor on the division.

Parameters:

parameter
other

The value to divide by.

Example:

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf = tf.select(td.col("temp"), td.col("temp").floordiv(2)
>>> .alias("floordiv"))
>>>
┌──────┬──────────┐
│ temp ┆ floordiv │
----------
│ f64 ┆ i64 │
╞══════╪══════════╡
2.51
1.40
└──────┴──────────┘

expr_resolves_to_multiple_outputs

def expr_resolves_to_multiple_outputs(expr: Expr) -> bool

TableFrameError

class TableFrameError(error_code: ErrorCode, *args)

Bases: TabsDataException

Exception raised when handling a TableFrame.

property
error_codeErrorCode