[−][src]Enum tubular::Column
Represents a single column in a DataFrame
.
Column
s are composed of 0 or more cells, all of a single type. Conceptually,
columns come in two flavors: T
and Option<T>
. When all values are known to
exist, the T
flavor is much easier to work with.
Only some types can be used as cells in a Column
-- types that implement
ColumnType
. An Iterator
over items that impl ColumnType
can be
converted into a Column
easily using the blanket impl of From
as seen below.
Example:
use tubular::Column; let column: Column = (&["apple", "banana", "orange"]).into();
You should never need to create a Column
manually. Instead use
push()
to create a Column
while adding it
to a DataFrame
.
Variants
Methods
impl Column
[src]
pub fn len(&self) -> usize
[src]
Number of cells in the Column.
use tubular::Column; let column: Column = vec![ Some("apple".to_string()), None, Some("banana".to_string()) ].into(); assert_eq!(column.len(), 3);
Trait Implementations
impl Clone for Column
[src]
impl Debug for Column
[src]
impl<I: IntoIterator<Item = C>, C: ColumnType> From<I> for Column
[src]
impl<'_> Into<Vec<String>> for &'_ Column
[src]
impl PartialEq<Column> for Column
[src]
impl StructuralPartialEq for Column
[src]
Auto Trait Implementations
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnwindSafe for Column
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,