Realm

oa::data::DataFrame

Ordered named host columns with one checked row count. let mut frame = oa::DataFrame::new(); frame.set_column("timestamp", oa::Series::I64(vec![0, 1]))?; frame.set_column("close", oa::Series::F64(vec![10.0, 11.0]))?; let last = frame.slice(1..2)?; assert_eq!(last.len(), 1); Unlike the donor, missing columns and unequal lengths are errors. Whole-column replacement is transactional; exclusive mutable slices cannot invalidate lengths.

StRust public API

Declaration

pub struct DataFrame { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn set_column( &mut self, name: impl Into<String>, series: Series, ) -> Result<()>
pub fn column(&self, name: &str) -> Result<SeriesView<'_>>
pub fn column_mut(&mut self, name: &str) -> Result<SeriesViewMut<'_>>
pub fn column_names(&self) -> impl ExactSizeIterator<Item = &str>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn slice(&self, range: Range<usize>) -> Result<DataFrameView<'_>>
fn clone(&self) -> DataFrame
fn fmt(&self, f: &mut Formatter<'_>) -> Result

Associated Functions

pub fn new() -> Self
fn default() -> DataFrame

Public Method Documentation

pub fn set_column( &mut self, name: impl Into<String>, series: Series, ) -> Result<()>
No public source comment is attached to this declaration.
pub fn column( &self, name: &str ) -> Result<SeriesView<'_>>
No public source comment is attached to this declaration.
pub fn column_mut( &mut self, name: &str ) -> Result<SeriesViewMut<'_>>
No public source comment is attached to this declaration.
pub fn column_names( &self ) -> impl ExactSizeIterator<Item = &str>
No public source comment is attached to this declaration.
pub fn len( &self ) -> usize
No public source comment is attached to this declaration.
pub fn is_empty( &self ) -> bool
No public source comment is attached to this declaration.
pub fn slice( &self, range: Range<usize> ) -> Result<DataFrameView<'_>>
No public source comment is attached to this declaration.
fn clone( &self ) -> DataFrame
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.
pub fn new() -> Self
No public source comment is attached to this declaration.
fn default() -> DataFrame
No public source comment is attached to this declaration.