Enum polars_core::datatypes::DataType
source · [−]pub enum DataType {
}
Variants
Boolean
UInt8
UInt16
UInt32
UInt64
Int8
Int16
Int32
Int64
Float32
Float64
Utf8
String data
Date
A 32-bit date representing the elapsed time since UNIX epoch (1970-01-01) in days (32 bits).
Datetime(TimeUnit, Option<TimeZone>)
A 64-bit date representing the elapsed time since UNIX epoch (1970-01-01) in milliseconds (64 bits).
Duration(TimeUnit)
Time
A 64-bit time representing the elapsed time since midnight in nanoseconds
List(Box<DataType>)
Object(&'static str)
A generic type that can be used in a Series
&’static str can be used to determine/set inner type
Null
Categorical(Option<Arc<RevMapping>>)
Struct(Vec<Field>)
Unknown
Implementations
sourceimpl DataType
impl DataType
pub fn inner_dtype(&self) -> Option<&DataType>
sourcepub fn to_physical(&self) -> DataType
pub fn to_physical(&self) -> DataType
Convert to the physical data type
sourcepub fn is_logical(&self) -> bool
pub fn is_logical(&self) -> bool
Check if this DataType
is a logical type
sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Check if this DataType
is a numeric type
sourcepub fn to_arrow(&self) -> ArrowDataType
pub fn to_arrow(&self) -> ArrowDataType
Convert to an Arrow data type.
Trait Implementations
sourceimpl From<&'_ DataType> for DataType
impl From<&'_ DataType> for DataType
sourcefn from(dt: &ArrowDataType) -> Self
fn from(dt: &ArrowDataType) -> Self
Performs the conversion.
impl Eq for DataType
Auto Trait Implementations
impl RefUnwindSafe for DataType
impl Send for DataType
impl Sync for DataType
impl Unpin for DataType
impl UnwindSafe for DataType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more