>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"values": [-1, 2, -3, 4]})
>>> t.values.abs()
┏━━━━━━━━━━━━━┓ ┃ Abs(values) ┃ ┡━━━━━━━━━━━━━┩ │ int64 │ ├─────────────┤ │ 1 │ │ 2 │ │ 3 │ │ 4 │ └─────────────┘
Integer, floating point, decimal, and boolean expressions.
Name | Description |
---|---|
abs | Return the absolute value of self . |
acos | Compute the arc cosine of self . |
asin | Compute the arc sine of self . |
atan | Compute the arc tangent of self . |
atan2 | Compute the two-argument version of arc tangent. |
bucket | Compute a discrete binning of a numeric array. |
ceil | Return the ceiling of self . |
corr | Return the correlation of two numeric columns. |
cos | Compute the cosine of self . |
cot | Compute the cotangent of self . |
cov | Return the covariance of two numeric columns. |
degrees | Compute the degrees of self radians. |
exp | Compute \(e^\texttt{self}\). |
floor | Return the floor of an expression. |
ln | Compute \(\ln\left(\texttt{self}\right)\). |
log | Compute \(\log_{\texttt{base}}\left(\texttt{self}\right)\). |
log10 | Compute \(\log_{10}\left(\texttt{self}\right)\). |
log2 | Compute \(\log_{2}\left(\texttt{self}\right)\). |
mean | Return the mean of a numeric column. |
negate | Negate a numeric expression. |
radians | Compute radians from self degrees. |
round | Round values to an indicated number of decimal places. |
sign | Return the sign of the input. |
sin | Compute the sine of self . |
sqrt | Compute the square root of self . |
std | Return the standard deviation of a numeric column. |
sum | Return the sum of a numeric column. |
tan | Compute the tangent of self . |
var | Return the variance of a numeric column. |
Return the absolute value of self
.
Compute the arc cosine of self
.
Compute the arc sine of self
.
Compute the arc tangent of self
.
Compute the two-argument version of arc tangent.
Compute a discrete binning of a numeric array.
Name | Type | Description | Default |
---|---|---|---|
buckets | Sequence[int] | List of buckets | required |
closed | Literal['left', 'right'] | Which side of each interval is closed. For example: python buckets = [0, 100, 200] closed = "left" # 100 falls in 2nd bucket closed = "right" # 100 falls in 1st bucket |
'left' |
close_extreme | bool | Whether the extreme values fall in the last bucket | True |
include_over | bool | Include values greater than the last bucket in the last bucket | False |
include_under | bool | Include values less than the first bucket in the first bucket | False |
Name | Type | Description |
---|---|---|
IntegerColumn | A categorical column expression |
Return the ceiling of self
.
Return the correlation of two numeric columns.
Name | Type | Description | Default |
---|---|---|---|
right | NumericColumn | Numeric column | required |
where | ir.BooleanValue | None | Filter | None |
how | Literal['sample', 'pop'] | Population or sample correlation | 'sample' |
Name | Type | Description |
---|---|---|
NumericScalar | The correlation of left and right |
Compute the cosine of self
.
Compute the cotangent of self
.
Return the covariance of two numeric columns.
Name | Type | Description | Default |
---|---|---|---|
right | NumericColumn | Numeric column | required |
where | ir.BooleanValue | None | Filter | None |
how | Literal['sample', 'pop'] | Population or sample covariance | 'sample' |
Name | Type | Description |
---|---|---|
NumericScalar | The covariance of self and right |
Compute the degrees of self
radians.
>>> import ibis
>>> ibis.options.interactive = True
>>> from math import pi
>>> t = ibis.memtable({"values": [0, pi / 2, pi, 3 * pi / 2, 2 * pi]})
>>> t.values.degrees()
┏━━━━━━━━━━━━━━━━━┓ ┃ Degrees(values) ┃ ┡━━━━━━━━━━━━━━━━━┩ │ float64 │ ├─────────────────┤ │ 0.0 │ │ 90.0 │ │ 180.0 │ │ 270.0 │ │ 360.0 │ └─────────────────┘
Compute \(e^\texttt{self}\).
Name | Type | Description |
---|---|---|
NumericValue | \(e^\texttt{self}\) |
Return the floor of an expression.
Compute \(\ln\left(\texttt{self}\right)\).
Compute \(\log_{\texttt{base}}\left(\texttt{self}\right)\).
Name | Type | Description | Default |
---|---|---|---|
base | NumericValue | None | The base of the logarithm. If None , base e is used. |
None |
Name | Type | Description |
---|---|---|
NumericValue | Logarithm of arg with base base |
Compute \(\log_{10}\left(\texttt{self}\right)\).
Compute \(\log_{2}\left(\texttt{self}\right)\).
Return the mean of a numeric column.
Name | Type | Description | Default |
---|---|---|---|
where | ir.BooleanValue | None | Filter | None |
Name | Type | Description |
---|---|---|
NumericScalar | The mean of the input expression |
Negate a numeric expression.
Name | Type | Description |
---|---|---|
NumericValue | A numeric value expression |
Compute radians from self
degrees.
>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"values": [0, 90, 180, 270, 360]})
>>> t.values.radians()
┏━━━━━━━━━━━━━━━━━┓ ┃ Radians(values) ┃ ┡━━━━━━━━━━━━━━━━━┩ │ float64 │ ├─────────────────┤ │ 0.000000 │ │ 1.570796 │ │ 3.141593 │ │ 4.712389 │ │ 6.283185 │ └─────────────────┘
Round values to an indicated number of decimal places.
Name | Type | Description | Default |
---|---|---|---|
digits | int | IntegerValue | None | The number of digits to round to. Here’s how the digits parameter affects the expression output type: - digits is False -y; self.type() is decimal → decimal - digits is nonzero; self.type() is decimal → decimal - digits is False -y; self.type() is Floating → int64 - digits is nonzero; self.type() is Floating → float64 |
None |
Name | Type | Description |
---|---|---|
NumericValue | The rounded expression |
>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"values": [1.22, 1.64, 2.15, 2.54]})
>>> t
┏━━━━━━━━━┓ ┃ values ┃ ┡━━━━━━━━━┩ │ float64 │ ├─────────┤ │ 1.22 │ │ 1.64 │ │ 2.15 │ │ 2.54 │ └─────────┘
┏━━━━━━━━━━━━━━━┓ ┃ Round(values) ┃ ┡━━━━━━━━━━━━━━━┩ │ int64 │ ├───────────────┤ │ 1 │ │ 2 │ │ 2 │ │ 3 │ └───────────────┘
Return the sign of the input.
Compute the sine of self
.
Compute the square root of self
.
Return the standard deviation of a numeric column.
Name | Type | Description | Default |
---|---|---|---|
where | ir.BooleanValue | None | Filter | None |
how | Literal['sample', 'pop'] | Sample or population standard deviation | 'sample' |
Name | Type | Description |
---|---|---|
NumericScalar | Standard deviation of arg |
Return the sum of a numeric column.
Name | Type | Description | Default |
---|---|---|---|
where | ir.BooleanValue | None | Filter | None |
Name | Type | Description |
---|---|---|
NumericScalar | The sum of the input expression |
Compute the tangent of self
.
Return the variance of a numeric column.
Name | Type | Description | Default |
---|---|---|---|
where | ir.BooleanValue | None | Filter | None |
how | Literal['sample', 'pop'] | Sample or population variance | 'sample' |
Name | Type | Description |
---|---|---|
NumericScalar | Standard deviation of arg |
Name | Description |
---|---|
bit_and | Aggregate the column using the bitwise and operator. |
bit_or | Aggregate the column using the bitwise or operator. |
bit_xor | Aggregate the column using the bitwise exclusive or operator. |
to_timestamp |
Aggregate the column using the bitwise and operator.
Aggregate the column using the bitwise or operator.
Aggregate the column using the bitwise exclusive or operator.
Name | Description |
---|---|
isinf | Return whether the value is infinity. |
isnan | Return whether the value is NaN. |
Return whether the value is infinity.
Return whether the value is NaN.