pub enum DataType {
Show 25 variants
Boolean,
UInt8,
UInt16,
UInt32,
UInt64,
Int8,
Int16,
Int32,
Int64,
Float32,
Float64,
Decimal(Option<usize>, Option<usize>),
Utf8,
Binary,
Date,
Datetime(TimeUnit, Option<String>),
Duration(TimeUnit),
Time,
Array(Box<DataType>, usize),
List(Box<DataType>),
Object(&'static str),
Null,
Categorical(Option<Arc<RevMapping>>),
Struct(Vec<Field>),
Unknown,
}
Variants§
Boolean
UInt8
UInt16
UInt32
UInt64
Int8
Int16
Int32
Int64
Float32
Float64
Decimal(Option<usize>, Option<usize>)
dtype-decimal
only.Fixed point decimal type optional precision and non-negative scale. This is backed by a signed 128-bit integer which allows for up to 38 significant digits.
Utf8
String data
Binary
Date
A 32-bit date representing the elapsed time since UNIX epoch (1970-01-01) in days (32 bits).
Datetime(TimeUnit, Option<String>)
A 64-bit date representing the elapsed time since UNIX epoch (1970-01-01) in the given timeunit (64 bits).
Duration(TimeUnit)
Time
A 64-bit time representing the elapsed time since midnight in nanoseconds
Array(Box<DataType>, usize)
dtype-array
only.A nested list with a fixed size in each row
List(Box<DataType>)
A nested list with a variable size in each row
Object(&'static str)
object
only.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>>)
dtype-categorical
only.Struct(Vec<Field>)
dtype-struct
only.Unknown
Implementations§
source§impl DataType
impl DataType
pub fn value_within_range(&self, other: AnyValue<'_>) -> bool
sourcepub fn inner_dtype(&self) -> Option<&DataType>
pub fn inner_dtype(&self) -> Option<&DataType>
Get the inner data type of a nested type.
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_temporal(&self) -> bool
pub fn is_temporal(&self) -> bool
Check if this DataType
is a temporal type
sourcepub fn is_primitive(&self) -> bool
pub fn is_primitive(&self) -> bool
Check if datatype is a primitive type. By that we mean that it is not a container type.
sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Check if this DataType
is a basic numeric type (excludes Decimal).
sourcepub fn is_decimal(&self) -> bool
pub fn is_decimal(&self) -> bool
Check if this DataType
is a Decimal type (of any scale/precision).
sourcepub fn is_float(&self) -> bool
pub fn is_float(&self) -> bool
Check if this DataType
is a basic floating point type (excludes Decimal).
sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Check if this DataType
is an integer.
pub fn is_signed_integer(&self) -> bool
pub fn is_unsigned_integer(&self) -> bool
sourcepub fn to_arrow(&self) -> ArrowDataType
pub fn to_arrow(&self) -> ArrowDataType
Convert to an Arrow data type.
pub fn is_nested_null(&self) -> bool
Trait Implementations§
source§impl From<&ArrowDataType> for DataType
impl From<&ArrowDataType> for DataType
source§fn from(dt: &ArrowDataType) -> DataType
fn from(dt: &ArrowDataType) -> DataType
source§impl PartialEq<ArrowDataType> for DataType
impl PartialEq<ArrowDataType> for DataType
source§fn eq(&self, other: &ArrowDataType) -> bool
fn eq(&self, other: &ArrowDataType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for DataType
impl PartialEq for DataType
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.