pub struct DataFrame {
pub constants: HashMap<Key, DataValue>,
pub dataframe: ColumnFrame,
pub metadata: HashMap<String, DataValue>,
}
Expand description
DataFrame holds information about ColumnFrame
.
This is used to store the data and the metadata for the candidates.
Fields§
§constants: HashMap<Key, DataValue>
Constants for the dataframe - mikro optimization for the data Values which is constant for the whole dataframe are stored here
dataframe: ColumnFrame
Dataframe with the candidates
metadata: HashMap<String, DataValue>
Metadata for the dataframe. Here you can store the information about the dataframe
Implementations§
Source§impl DataFrame
impl DataFrame
pub fn new<C: Into<ColumnFrame>>(dataframe: C) -> Self
pub fn shrink(&mut self)
pub fn add_metadata(&mut self, key: String, value: DataValue)
pub fn get_metadata(&self, key: &str) -> Option<&DataValue>
pub fn join( &mut self, other: Self, join_type: &JoinRelation, ) -> Result<(), Error>
pub fn apply_function<F>(&mut self, keys: &[Key], func: F) -> Result<(), Error>
pub fn select(&self, keys: Option<&[Key]>) -> Result<Array2<DataValue>, Error>
pub fn select_transposed_typed<D: Extract>(&self, keys: &[Key]) -> Vec<Vec<D>>
pub fn select_column(&self, key: Key) -> Option<ArrayView1<'_, DataValue>>
pub fn select_transposed( &self, keys: Option<&[Key]>, ) -> Result<Array2<DataValue>, Error>
pub fn insert_constant(&mut self, key: Key, value: DataValue)
pub fn push<C: CandidateData>(&mut self, item: C) -> Result<(), Error>
pub fn remove_column(&mut self, keys: &[Key]) -> Result<Self, Error>
pub fn extend(&mut self, items: Self) -> Result<(), Error>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn add_single_column<K: Into<Key>>( &mut self, key: K, values: Array1<DataValue>, ) -> Result<(), Error>
pub fn get_single_column(&self, key: &Key) -> Option<ArrayView1<'_, DataValue>>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataFrame
impl<'de> Deserialize<'de> for DataFrame
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ColumnFrame> for DataFrame
impl From<ColumnFrame> for DataFrame
Source§fn from(dataframe: ColumnFrame) -> Self
fn from(dataframe: ColumnFrame) -> Self
Converts to this type from the input type.
Source§impl From<SizedHashMap<SmartString<LazyCompact>, Vec<DataValue>>> for DataFrame
impl From<SizedHashMap<SmartString<LazyCompact>, Vec<DataValue>>> for DataFrame
impl StructuralPartialEq for DataFrame
Auto Trait Implementations§
impl Freeze for DataFrame
impl RefUnwindSafe for DataFrame
impl Send for DataFrame
impl Sync for DataFrame
impl Unpin for DataFrame
impl UnwindSafe for DataFrame
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
Mutably borrows from an owned value. Read more