Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pola-rs
GitHub Repository: pola-rs/polars
Path: blob/main/crates/polars-plan/src/dsl/extension.rs
7884 views
1
use super::*;
2
3
/// Specialized expressions for Categorical dtypes.
4
pub struct ExtensionNameSpace(pub(crate) Expr);
5
6
impl ExtensionNameSpace {
7
pub fn to(self, dtype: impl Into<DataTypeExpr>) -> Expr {
8
self.0.map_unary(ExtensionFunction::To(dtype.into()))
9
}
10
11
pub fn storage(self) -> Expr {
12
self.0.map_unary(ExtensionFunction::Storage)
13
}
14
}
15
16