Class: Polars::ExtensionExpr
- Inherits:
-
Object
- Object
- Polars::ExtensionExpr
- Defined in:
- lib/polars/extension_expr.rb
Overview
Namespace for extension type related expressions.
Instance Method Summary collapse
-
#storage ⇒ Expr
Get the storage values of an extension data type.
-
#to(dtype) ⇒ Expr
Convert to an extension
dtype.
Instance Method Details
#storage ⇒ Expr
Note:
This functionality is currently considered unstable. It may be changed at any point without it being considered a breaking change.
Get the storage values of an extension data type.
If the input does not have an extension data type, it is returned as-is.
35 36 37 |
# File 'lib/polars/extension_expr.rb', line 35 def storage Utils.wrap_expr(_rbexpr.ext_storage) end |
#to(dtype) ⇒ Expr
Note:
This functionality is currently considered unstable. It may be changed at any point without it being considered a breaking change.
Convert to an extension dtype.
The input must be of the storage type of the extension dtype.
21 22 23 24 |
# File 'lib/polars/extension_expr.rb', line 21 def to(dtype) rb_dtype = Utils.parse_into_datatype_expr(dtype)._rbdatatype_expr Utils.wrap_expr(_rbexpr.ext_to(rb_dtype)) end |