[−][src]Enum polars::series::Series
Variants
UInt32(ChunkedArray<UInt32Type>)
Int32(ChunkedArray<Int32Type>)
Int64(ChunkedArray<Int64Type>)
Float32(ChunkedArray<Float32Type>)
Float64(ChunkedArray<Float64Type>)
Utf8(ChunkedArray<Utf8Type>)
Bool(ChunkedArray<BooleanType>)
Date32(ChunkedArray<Date32Type>)
Date64(ChunkedArray<Date64Type>)
Time64Ns(ChunkedArray<Time64NanosecondType>)
DurationNs(ChunkedArray<DurationNanosecondType>)
Implementations
impl Series
[src]
pub fn sum<T>(&self) -> Option<T> where
T: NumCast + Zero + ToPrimitive,
[src]
T: NumCast + Zero + ToPrimitive,
Returns None
if the array is empty or only contains null values.
let s = Series::new("days", [1, 2, 3].as_ref()); assert_eq!(s.sum(), Some(6));
pub fn min<T>(&self) -> Option<T> where
T: NumCast + Zero + ToPrimitive,
[src]
T: NumCast + Zero + ToPrimitive,
Returns the minimum value in the array, according to the natural order. Returns an option because the array is nullable.
let s = Series::new("days", [1, 2, 3].as_ref()); assert_eq!(s.min(), Some(1));
pub fn max<T>(&self) -> Option<T> where
T: NumCast + Zero + ToPrimitive,
[src]
T: NumCast + Zero + ToPrimitive,
Returns the maximum value in the array, according to the natural order. Returns an option because the array is nullable.
let s = Series::new("days", [1, 2, 3].as_ref()); assert_eq!(s.max(), Some(3));
pub fn mean<T>(&self) -> Option<T> where
T: NumCast + Zero + ToPrimitive + Div<Output = T>,
[src]
T: NumCast + Zero + ToPrimitive + Div<Output = T>,
impl Series
[src]
pub fn chunk_lengths(&self) -> &Vec<usize>
[src]
Get the lengths of the underlying chunks
pub fn name(&self) -> &str
[src]
Name of series.
pub fn rename(&mut self, name: &str)
[src]
Rename series.
pub fn field(&self) -> &Field
[src]
Get field (used in schema)
pub fn dtype(&self) -> &ArrowDataType
[src]
Get datatype of series.
pub fn chunks(&self) -> &Vec<ArrayRef>
[src]
Underlying chunks.
pub fn n_chunks(&self) -> usize
[src]
No. of chunks
pub fn i32(&self) -> Result<&Int32Chunked>
[src]
Unpack to ChunkedArray
let s: Series = [1, 2, 3].iter().collect(); let s_squared: Series = s.i32() .unwrap() .into_iter() .map(|opt_v| { match opt_v { Some(v) => Some(v * v), None => None, // null value } }).collect();
pub fn i64(&self) -> Result<&Int64Chunked>
[src]
Unpack to ChunkedArray
pub fn f32(&self) -> Result<&Float32Chunked>
[src]
Unpack to ChunkedArray
pub fn f64(&self) -> Result<&Float64Chunked>
[src]
Unpack to ChunkedArray
pub fn u32(&self) -> Result<&UInt32Chunked>
[src]
Unpack to ChunkedArray
pub fn bool(&self) -> Result<&BooleanChunked>
[src]
Unpack to ChunkedArray
pub fn utf8(&self) -> Result<&Utf8Chunked>
[src]
Unpack to ChunkedArray
pub fn date32(&self) -> Result<&Date32Chunked>
[src]
Unpack to ChunkedArray
pub fn date64(&self) -> Result<&Date64Chunked>
[src]
Unpack to ChunkedArray
pub fn time64ns(&self) -> Result<&Time64NsChunked>
[src]
Unpack to ChunkedArray
pub fn duration_ns(&self) -> Result<&DurationNsChunked>
[src]
Unpack to ChunkedArray
pub fn append_array(&mut self, other: ArrayRef) -> Result<()>
[src]
pub fn limit(&self, num_elements: usize) -> Result<Self>
[src]
Take num_elements
from the top as a zero copy view.
pub fn slice(&self, offset: usize, length: usize) -> Result<Self>
[src]
Get a zero copy view of the data.
pub fn append(&mut self, other: &Self) -> Result<()>
[src]
Append a Series of the same type in place.
pub fn filter<T: AsRef<BooleanChunked>>(&self, filter: T) -> Result<Self>
[src]
Filter by boolean mask. This operation clones data.
pub fn take_iter(
&self,
iter: impl Iterator<Item = usize>,
capacity: Option<usize>
) -> Result<Self>
[src]
&self,
iter: impl Iterator<Item = usize>,
capacity: Option<usize>
) -> Result<Self>
Take by index from an iterator. This operation clones the data.
pub fn take_opt_iter(
&self,
iter: impl Iterator<Item = Option<usize>>,
capacity: Option<usize>
) -> Result<Self>
[src]
&self,
iter: impl Iterator<Item = Option<usize>>,
capacity: Option<usize>
) -> Result<Self>
Take by index from an iterator. This operation clones the data.
pub fn take<T: TakeIndex>(&self, indices: &T) -> Result<Self>
[src]
Take by index. This operation is clone.
pub fn len(&self) -> usize
[src]
Get length of series.
pub fn rechunk(&self, chunk_lengths: Option<&[usize]>) -> Result<Self>
[src]
Aggregate all chunks to a contiguous array of memory.
pub fn head(&self, length: Option<usize>) -> Self
[src]
Get the head of the Series.
pub fn tail(&self, length: Option<usize>) -> Self
[src]
Get the tail of the Series.
pub fn cast<N>(&self) -> Result<Self> where
N: PolarsDataType,
[src]
N: PolarsDataType,
Cast to an some primitive type.
pub fn get(&self, index: usize) -> AnyType
[src]
Get a single value by index. Don't use this operation for loops as a runtime cast is needed for every iteration.
pub fn sort_in_place(&mut self, reverse: bool)
[src]
Sort in place.
pub fn sort(&self, reverse: bool) -> Self
[src]
pub fn argsort(&self, reverse: bool) -> Vec<usize>
[src]
Retrieve the indexes needed for a sort.
pub fn null_count(&self) -> usize
[src]
Count the null values.
pub fn unique(&self) -> Self
[src]
Get unique values in the Series.
pub fn arg_unique(&self) -> Vec<usize>
[src]
Get first indexes of unique values.
pub fn is_null(&self) -> BooleanChunked
[src]
Get a mask of the null values.
pub fn null_bits(&self) -> Vec<(usize, Option<Buffer>)>
[src]
Get the bits that represent the null values of the underlying ChunkedArray
pub fn reverse(&self) -> Self
[src]
return a Series in reversed order
impl Series
[src]
pub fn series_equal(&self, other: &Series) -> bool
[src]
Trait Implementations
impl<'_> Add<&'_ Series> for &'_ Series
[src]
type Output = Series
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
impl Add<Series> for Series
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
impl<T, '_> Add<T> for &'_ Series where
T: Num + NumCast,
[src]
T: Num + NumCast,
type Output = Series
The resulting type after applying the +
operator.
fn add(self, rhs: T) -> Self::Output
[src]
impl<T> Add<T> for Series where
T: Num + NumCast,
[src]
T: Num + NumCast,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: T) -> Self::Output
[src]
impl AsMut<ChunkedArray<BooleanType>> for Series
[src]
fn as_mut(&mut self) -> &mut ChunkedArray<BooleanType>
[src]
impl AsMut<ChunkedArray<Float32Type>> for Series
[src]
fn as_mut(&mut self) -> &mut ChunkedArray<Float32Type>
[src]
impl AsMut<ChunkedArray<Float64Type>> for Series
[src]
fn as_mut(&mut self) -> &mut ChunkedArray<Float64Type>
[src]
impl AsMut<ChunkedArray<Int32Type>> for Series
[src]
fn as_mut(&mut self) -> &mut ChunkedArray<Int32Type>
[src]
impl AsMut<ChunkedArray<Int64Type>> for Series
[src]
fn as_mut(&mut self) -> &mut ChunkedArray<Int64Type>
[src]
impl AsMut<ChunkedArray<UInt32Type>> for Series
[src]
fn as_mut(&mut self) -> &mut ChunkedArray<UInt32Type>
[src]
impl AsMut<ChunkedArray<Utf8Type>> for Series
[src]
fn as_mut(&mut self) -> &mut ChunkedArray<Utf8Type>
[src]
impl AsRef<ChunkedArray<BooleanType>> for Series
[src]
fn as_ref(&self) -> &ChunkedArray<BooleanType>
[src]
impl AsRef<ChunkedArray<Float32Type>> for Series
[src]
fn as_ref(&self) -> &ChunkedArray<Float32Type>
[src]
impl AsRef<ChunkedArray<Float64Type>> for Series
[src]
fn as_ref(&self) -> &ChunkedArray<Float64Type>
[src]
impl AsRef<ChunkedArray<Int32Type>> for Series
[src]
fn as_ref(&self) -> &ChunkedArray<Int32Type>
[src]
impl AsRef<ChunkedArray<Int64Type>> for Series
[src]
fn as_ref(&self) -> &ChunkedArray<Int64Type>
[src]
impl AsRef<ChunkedArray<UInt32Type>> for Series
[src]
fn as_ref(&self) -> &ChunkedArray<UInt32Type>
[src]
impl AsRef<ChunkedArray<Utf8Type>> for Series
[src]
fn as_ref(&self) -> &ChunkedArray<Utf8Type>
[src]
impl Clone for Series
[src]
impl<'_> CmpOps<&'_ Series> for Series
[src]
fn eq(&self, rhs: &Series) -> BooleanChunked
[src]
Create a boolean mask by checking for equality.
fn neq(&self, rhs: &Series) -> BooleanChunked
[src]
Create a boolean mask by checking for inequality.
fn gt(&self, rhs: &Series) -> BooleanChunked
[src]
Create a boolean mask by checking if lhs > rhs.
fn gt_eq(&self, rhs: &Series) -> BooleanChunked
[src]
Create a boolean mask by checking if lhs >= rhs.
fn lt(&self, rhs: &Series) -> BooleanChunked
[src]
Create a boolean mask by checking if lhs < rhs.
fn lt_eq(&self, rhs: &Series) -> BooleanChunked
[src]
Create a boolean mask by checking if lhs <= rhs.
impl<'_> CmpOps<&'_ str> for Series
[src]
fn eq(&self, rhs: &str) -> BooleanChunked
[src]
fn neq(&self, rhs: &str) -> BooleanChunked
[src]
fn gt(&self, rhs: &str) -> BooleanChunked
[src]
fn gt_eq(&self, rhs: &str) -> BooleanChunked
[src]
fn lt(&self, rhs: &str) -> BooleanChunked
[src]
fn lt_eq(&self, rhs: &str) -> BooleanChunked
[src]
impl<Rhs> CmpOps<Rhs> for Series where
Rhs: NumComp,
[src]
Rhs: NumComp,
fn eq(&self, rhs: Rhs) -> BooleanChunked
[src]
fn neq(&self, rhs: Rhs) -> BooleanChunked
[src]
fn gt(&self, rhs: Rhs) -> BooleanChunked
[src]
fn gt_eq(&self, rhs: Rhs) -> BooleanChunked
[src]
fn lt(&self, rhs: Rhs) -> BooleanChunked
[src]
fn lt_eq(&self, rhs: Rhs) -> BooleanChunked
[src]
impl Debug for Series
[src]
impl Display for Series
[src]
impl<'_> Div<&'_ Series> for &'_ Series
[src]
type Output = Series
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Self::Output
[src]
let s: Series = [1, 2, 3].iter().collect(); let out = &s / &s;
impl Div<Series> for Series
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Self::Output
[src]
impl<T, '_> Div<T> for &'_ Series where
T: Num + NumCast,
[src]
T: Num + NumCast,
type Output = Series
The resulting type after applying the /
operator.
fn div(self, rhs: T) -> Self::Output
[src]
impl<T> Div<T> for Series where
T: Num + NumCast,
[src]
T: Num + NumCast,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: T) -> Self::Output
[src]
impl<'a> FromIterator<&'a bool> for Series
[src]
fn from_iter<I: IntoIterator<Item = &'a bool>>(iter: I) -> Self
[src]
impl<'a> FromIterator<&'a f32> for Series
[src]
fn from_iter<I: IntoIterator<Item = &'a f32>>(iter: I) -> Self
[src]
impl<'a> FromIterator<&'a f64> for Series
[src]
fn from_iter<I: IntoIterator<Item = &'a f64>>(iter: I) -> Self
[src]
impl<'a> FromIterator<&'a i32> for Series
[src]
fn from_iter<I: IntoIterator<Item = &'a i32>>(iter: I) -> Self
[src]
impl<'a> FromIterator<&'a i64> for Series
[src]
fn from_iter<I: IntoIterator<Item = &'a i64>>(iter: I) -> Self
[src]
impl<'a> FromIterator<&'a str> for Series
[src]
fn from_iter<I: IntoIterator<Item = &'a str>>(iter: I) -> Self
[src]
impl<'a> FromIterator<&'a u32> for Series
[src]
fn from_iter<I: IntoIterator<Item = &'a u32>>(iter: I) -> Self
[src]
impl FromIterator<Option<bool>> for Series
[src]
fn from_iter<I: IntoIterator<Item = Option<bool>>>(iter: I) -> Self
[src]
impl FromIterator<Option<f32>> for Series
[src]
fn from_iter<I: IntoIterator<Item = Option<f32>>>(iter: I) -> Self
[src]
impl FromIterator<Option<f64>> for Series
[src]
fn from_iter<I: IntoIterator<Item = Option<f64>>>(iter: I) -> Self
[src]
impl FromIterator<Option<i32>> for Series
[src]
fn from_iter<I: IntoIterator<Item = Option<i32>>>(iter: I) -> Self
[src]
impl FromIterator<Option<i64>> for Series
[src]
fn from_iter<I: IntoIterator<Item = Option<i64>>>(iter: I) -> Self
[src]
impl FromIterator<Option<u32>> for Series
[src]
fn from_iter<I: IntoIterator<Item = Option<u32>>>(iter: I) -> Self
[src]
impl FromIterator<bool> for Series
[src]
fn from_iter<I: IntoIterator<Item = bool>>(iter: I) -> Self
[src]
impl FromIterator<f32> for Series
[src]
fn from_iter<I: IntoIterator<Item = f32>>(iter: I) -> Self
[src]
impl FromIterator<f64> for Series
[src]
fn from_iter<I: IntoIterator<Item = f64>>(iter: I) -> Self
[src]
impl FromIterator<i32> for Series
[src]
fn from_iter<I: IntoIterator<Item = i32>>(iter: I) -> Self
[src]
impl FromIterator<i64> for Series
[src]
fn from_iter<I: IntoIterator<Item = i64>>(iter: I) -> Self
[src]
impl FromIterator<u32> for Series
[src]
fn from_iter<I: IntoIterator<Item = u32>>(iter: I) -> Self
[src]
impl<T, '_> LhsNumOps<&'_ Series> for T where
T: Num + NumCast,
[src]
T: Num + NumCast,
type Output = Series
fn add(self, rhs: &Series) -> Self::Output
[src]
fn sub(self, rhs: &Series) -> Self::Output
[src]
fn div(self, rhs: &Series) -> Self::Output
[src]
fn mul(self, rhs: &Series) -> Self::Output
[src]
impl<'_> Mul<&'_ Series> for &'_ Series
[src]
type Output = Series
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self::Output
[src]
let s: Series = [1, 2, 3].iter().collect(); let out = &s * &s;
impl Mul<Series> for Series
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self::Output
[src]
impl<T, '_> Mul<T> for &'_ Series where
T: Num + NumCast,
[src]
T: Num + NumCast,
type Output = Series
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> Self::Output
[src]
impl<T> Mul<T> for Series where
T: Num + NumCast,
[src]
T: Num + NumCast,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> Self::Output
[src]
impl<'a, T: AsRef<[&'a str]>> NamedFrom<T, [&'a str]> for Series
[src]
impl<'a, T: AsRef<[Option<&'a str>]>> NamedFrom<T, [Option<&'a str>]> for Series
[src]
impl<T: AsRef<[Option<String>]>> NamedFrom<T, [Option<String>]> for Series
[src]
impl<T: AsRef<[Option<bool>]>> NamedFrom<T, [Option<bool>]> for Series
[src]
impl<T: AsRef<[Option<f32>]>> NamedFrom<T, [Option<f32>]> for Series
[src]
impl<T: AsRef<[Option<f64>]>> NamedFrom<T, [Option<f64>]> for Series
[src]
impl<T: AsRef<[Option<i32>]>> NamedFrom<T, [Option<i32>]> for Series
[src]
impl<T: AsRef<[Option<i64>]>> NamedFrom<T, [Option<i64>]> for Series
[src]
impl<T: AsRef<[Option<u32>]>> NamedFrom<T, [Option<u32>]> for Series
[src]
impl<T: AsRef<[String]>> NamedFrom<T, [String]> for Series
[src]
impl<T: AsRef<[bool]>> NamedFrom<T, [bool]> for Series
[src]
impl<T: AsRef<[f32]>> NamedFrom<T, [f32]> for Series
[src]
impl<T: AsRef<[f64]>> NamedFrom<T, [f64]> for Series
[src]
impl<T: AsRef<[i32]>> NamedFrom<T, [i32]> for Series
[src]
impl<T: AsRef<[i64]>> NamedFrom<T, [i64]> for Series
[src]
impl<T: AsRef<[u32]>> NamedFrom<T, [u32]> for Series
[src]
impl<'_> Sub<&'_ Series> for &'_ Series
[src]
type Output = Series
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output
[src]
impl Sub<Series> for Series
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output
[src]
impl<T, '_> Sub<T> for &'_ Series where
T: Num + NumCast,
[src]
T: Num + NumCast,
type Output = Series
The resulting type after applying the -
operator.
fn sub(self, rhs: T) -> Self::Output
[src]
impl<T> Sub<T> for Series where
T: Num + NumCast,
[src]
T: Num + NumCast,
Auto Trait Implementations
impl !RefUnwindSafe for Series
impl Send for Series
impl Sync for Series
impl Unpin for Series
impl !UnwindSafe for Series
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,