Struct polars_core::prelude::ArrowField [−][src]
pub struct ArrowField {
pub name: String,
pub data_type: DataType,
pub nullable: bool,
pub dict_id: i64,
pub dict_is_ordered: bool,
pub metadata: Option<BTreeMap<String, String>>,
}Expand description
A logical DataType and its associated metadata per
Arrow specification
Fields
name: StringIts name
data_type: DataTypeIts logical DataType
nullable: boolWhether its values can be null or not
dict_id: i64The dictionary id of this field (currently un-used)
dict_is_ordered: boolWhether the dictionary’s values are ordered
metadata: Option<BTreeMap<String, String>>A map of key-value pairs containing additional custom meta data.
Implementations
Creates a new field
Creates a new Field with metadata.
Sets the Field’s optional metadata.
The metadata is set as None for empty map.
Returns the Field’s optional custom metadata.
Returns the Field nullability.
Returns the dictionary ID, if this is a dictionary type.
Returns whether this Field’s dictionary is ordered, if this is a dictionary type.
Merge field into self if it is compatible. Struct will be merged recursively.
NOTE: self may be updated to unexpected state in case of merge failure.
Example:
use arrow2::datatypes::*;
let mut field = Field::new("c1", DataType::Int64, false);
assert!(field.try_merge(&Field::new("c1", DataType::Int64, true)).is_ok());
assert!(field.is_nullable());Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Field
impl UnwindSafe for Field
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.