Struct polars_core::series::Series
source · [−]pub struct Series(pub Arc<dyn SeriesTrait>);
Expand description
Series
The columnar data type for a DataFrame.
Most of the available functions are defined in the SeriesTrait trait.
The Series
struct consists
of typed ChunkedArray’s. To quickly cast
a Series
to a ChunkedArray
you can call the method with the name of the type:
let s: Series = [1, 2, 3].iter().collect();
// Quickly obtain the ChunkedArray wrapped by the Series.
let chunked_array = s.i32().unwrap();
Arithmetic
You can do standard arithmetic on series.
let s = Series::new("a", [1 , 2, 3]);
let out_add = &s + &s;
let out_sub = &s - &s;
let out_div = &s / &s;
let out_mul = &s * &s;
Or with series and numbers.
let s: Series = (1..3).collect();
let out_add_one = &s + 1;
let out_multiply = &s * 10;
// Could not overload left hand side operator.
let out_divide = 1.div(&s);
let out_add = 1.add(&s);
let out_subtract = 1.sub(&s);
let out_multiply = 1.mul(&s);
Comparison
You can obtain boolean mask by comparing series.
let s = Series::new("dollars", &[1, 2, 3]);
let mask = s.equal(1).unwrap();
let valid = [true, false, false].iter();
assert!(mask
.into_iter()
.map(|opt_bool| opt_bool.unwrap()) // option, because series can be null
.zip(valid)
.all(|(a, b)| a == *b))
See all the comparison operators in the CmpOps trait
Iterators
The Series variants contain differently typed ChunkedArray’s. These structs can be turned into iterators, making it possible to use any function/ closure you want on a Series.
These iterators return an Option<T>
because the values of a series may be null.
use polars_core::prelude::*;
let pi = 3.14;
let s = Series::new("angle", [2f32 * pi, pi, 1.5 * pi].as_ref());
let s_cos: Series = s.f32()
.expect("series was not an f32 dtype")
.into_iter()
.map(|opt_angle| opt_angle.map(|angle| angle.cos()))
.collect();
Creation
Series can be create from different data structures. Below we’ll show a few ways we can create a Series object.
// Series can be created from Vec's, slices and arrays
Series::new("boolean series", &[true, false, true]);
Series::new("int series", &[1, 2, 3]);
// And can be nullable
Series::new("got nulls", &[Some(1), None, Some(2)]);
// Series can also be collected from iterators
let from_iter: Series = (0..10)
.into_iter()
.collect();
Tuple Fields
0: Arc<dyn SeriesTrait>
Implementations
sourceimpl Series
impl Series
pub fn sample_n(
&self,
n: usize,
with_replacement: bool,
shuffle: bool,
seed: Option<u64>
) -> PolarsResult<Self>
random
only.sourcepub fn sample_frac(
&self,
frac: f64,
with_replacement: bool,
shuffle: bool,
seed: Option<u64>
) -> PolarsResult<Self>
Available on crate feature random
only.
pub fn sample_frac(
&self,
frac: f64,
with_replacement: bool,
shuffle: bool,
seed: Option<u64>
) -> PolarsResult<Self>
random
only.Sample a fraction between 0.0-1.0 of this ChunkedArray.
pub fn shuffle(&self, seed: Option<u64>) -> Self
random
only.sourceimpl Series
impl Series
pub fn from_any_values_and_dtype<'a>(
name: &str,
av: &[AnyValue<'a>],
dtype: &DataType
) -> PolarsResult<Series>
pub fn from_any_values<'a>(
name: &str,
av: &[AnyValue<'a>]
) -> PolarsResult<Series>
sourceimpl Series
impl Series
sourceimpl Series
impl Series
sourcepub fn iter(&self) -> SeriesIter<'_>ⓘNotable traits for SeriesIter<'a>impl<'a> Iterator for SeriesIter<'a> type Item = AnyValue<'a>;
pub fn iter(&self) -> SeriesIter<'_>ⓘNotable traits for SeriesIter<'a>impl<'a> Iterator for SeriesIter<'a> type Item = AnyValue<'a>;
pub fn phys_iter(&self) -> Box<dyn ExactSizeIterator<Item = AnyValue<'_>> + '_>
sourceimpl Series
impl Series
pub fn diff(&self, n: usize, null_behavior: NullBehavior) -> Series
diff
only.sourceimpl Series
impl Series
sourcepub fn i8(&self) -> PolarsResult<&Int8Chunked>
pub fn i8(&self) -> PolarsResult<&Int8Chunked>
Unpack to ChunkedArray of dtype i8
sourcepub fn i16(&self) -> PolarsResult<&Int16Chunked>
pub fn i16(&self) -> PolarsResult<&Int16Chunked>
Unpack to ChunkedArray i16
sourcepub fn i32(&self) -> PolarsResult<&Int32Chunked>
pub fn i32(&self) -> PolarsResult<&Int32Chunked>
Unpack to ChunkedArray
let s = Series::new("foo", [1i32 ,2, 3]);
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();
sourcepub fn i64(&self) -> PolarsResult<&Int64Chunked>
pub fn i64(&self) -> PolarsResult<&Int64Chunked>
Unpack to ChunkedArray of dtype i64
sourcepub fn f32(&self) -> PolarsResult<&Float32Chunked>
pub fn f32(&self) -> PolarsResult<&Float32Chunked>
Unpack to ChunkedArray of dtype f32
sourcepub fn f64(&self) -> PolarsResult<&Float64Chunked>
pub fn f64(&self) -> PolarsResult<&Float64Chunked>
Unpack to ChunkedArray of dtype f64
sourcepub fn u8(&self) -> PolarsResult<&UInt8Chunked>
pub fn u8(&self) -> PolarsResult<&UInt8Chunked>
Unpack to ChunkedArray of dtype u8
sourcepub fn u16(&self) -> PolarsResult<&UInt16Chunked>
pub fn u16(&self) -> PolarsResult<&UInt16Chunked>
Unpack to ChunkedArray of dtype u16
sourcepub fn u32(&self) -> PolarsResult<&UInt32Chunked>
pub fn u32(&self) -> PolarsResult<&UInt32Chunked>
Unpack to ChunkedArray of dtype u32
sourcepub fn u64(&self) -> PolarsResult<&UInt64Chunked>
pub fn u64(&self) -> PolarsResult<&UInt64Chunked>
Unpack to ChunkedArray of dtype u64
sourcepub fn bool(&self) -> PolarsResult<&BooleanChunked>
pub fn bool(&self) -> PolarsResult<&BooleanChunked>
Unpack to ChunkedArray of dtype bool
sourcepub fn utf8(&self) -> PolarsResult<&Utf8Chunked>
pub fn utf8(&self) -> PolarsResult<&Utf8Chunked>
Unpack to ChunkedArray of dtype utf8
sourcepub fn list(&self) -> PolarsResult<&ListChunked>
pub fn list(&self) -> PolarsResult<&ListChunked>
Unpack to ChunkedArray of dtype list
sourcepub fn categorical(&self) -> PolarsResult<&CategoricalChunked>
pub fn categorical(&self) -> PolarsResult<&CategoricalChunked>
Unpack to ChunkedArray of dtype categorical
sourceimpl Series
impl Series
sourcepub fn extend_constant(&self, value: AnyValue<'_>, n: usize) -> PolarsResult<Self>
pub fn extend_constant(&self, value: AnyValue<'_>, n: usize) -> PolarsResult<Self>
Extend with a constant value.
sourceimpl Series
impl Series
sourcepub fn skew(&self, bias: bool) -> PolarsResult<Option<f64>>
Available on crate feature moment
only.
pub fn skew(&self, bias: bool) -> PolarsResult<Option<f64>>
moment
only.Compute the sample skewness of a data set.
For normally distributed data, the skewness should be about zero. For
uni-modal continuous distributions, a skewness value greater than zero means
that there is more weight in the right tail of the distribution. The
function skewtest
can be used to determine if the skewness value
is close enough to zero, statistically speaking.
see: https://github.com/scipy/scipy/blob/47bb6febaa10658c72962b9615d5d5aa2513fa3a/scipy/stats/stats.py#L1024
sourcepub fn kurtosis(&self, fisher: bool, bias: bool) -> PolarsResult<Option<f64>>
Available on crate feature moment
only.
pub fn kurtosis(&self, fisher: bool, bias: bool) -> PolarsResult<Option<f64>>
moment
only.Compute the kurtosis (Fisher or Pearson) of a dataset.
Kurtosis is the fourth central moment divided by the square of the
variance. If Fisher’s definition is used, then 3.0 is subtracted from
the result to give 0.0 for a normal distribution.
If bias is false
then the kurtosis is calculated using k statistics to
eliminate bias coming from biased moment estimators
see: https://github.com/scipy/scipy/blob/47bb6febaa10658c72962b9615d5d5aa2513fa3a/scipy/stats/stats.py#L1027
sourceimpl Series
impl Series
sourcepub fn round(&self, decimals: u32) -> PolarsResult<Self>
Available on crate feature round_series
only.
pub fn round(&self, decimals: u32) -> PolarsResult<Self>
round_series
only.Round underlying floating point array to given decimal.
sourcepub fn floor(&self) -> PolarsResult<Self>
Available on crate feature round_series
only.
pub fn floor(&self) -> PolarsResult<Self>
round_series
only.Floor underlying floating point array to the lowest integers smaller or equal to the float value.
sourcepub fn ceil(&self) -> PolarsResult<Self>
Available on crate feature round_series
only.
pub fn ceil(&self) -> PolarsResult<Self>
round_series
only.Ceil underlying floating point array to the highest integers smaller or equal to the float value.
sourcepub fn clip(self, min: AnyValue<'_>, max: AnyValue<'_>) -> PolarsResult<Self>
Available on crate feature round_series
only.
pub fn clip(self, min: AnyValue<'_>, max: AnyValue<'_>) -> PolarsResult<Self>
round_series
only.Clamp underlying values to the min
and max
values.
sourcepub fn clip_max(self, max: AnyValue<'_>) -> PolarsResult<Self>
Available on crate feature round_series
only.
pub fn clip_max(self, max: AnyValue<'_>) -> PolarsResult<Self>
round_series
only.Clamp underlying values to the max
value.
sourcepub fn clip_min(self, min: AnyValue<'_>) -> PolarsResult<Self>
Available on crate feature round_series
only.
pub fn clip_min(self, min: AnyValue<'_>) -> PolarsResult<Self>
round_series
only.Clamp underlying values to the min
value.
sourceimpl Series
impl Series
sourcepub fn to_list(&self) -> PolarsResult<ListChunked>
pub fn to_list(&self) -> PolarsResult<ListChunked>
Convert the values of this Series to a ListChunked with a length of 1,
So a Series of:
[1, 2, 3]
becomes [[1, 2, 3]]
pub fn reshape(&self, dims: &[i64]) -> PolarsResult<Series>
sourceimpl Series
impl Series
sourcepub fn unique_counts(&self) -> IdxCa
Available on crate feature unique_counts
only.
pub fn unique_counts(&self) -> IdxCa
unique_counts
only.Returns a count of the unique values in the order of appearance.
sourceimpl Series
impl Series
pub fn set_sorted(&mut self, sorted: IsSorted)
pub fn into_frame(self) -> DataFrame
sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrink the capacity of this array to fit its length.
sourcepub fn append_array(&mut self, other: ArrayRef) -> PolarsResult<&mut Self>
pub fn append_array(&mut self, other: ArrayRef) -> PolarsResult<&mut Self>
Append arrow array of same datatype.
sourcepub fn append(&mut self, other: &Series) -> PolarsResult<&mut Self>
pub fn append(&mut self, other: &Series) -> PolarsResult<&mut Self>
Append in place. This is done by adding the chunks of other
to this Series
.
See ChunkedArray::append
and ChunkedArray::extend
.
sourcepub fn extend(&mut self, other: &Series) -> PolarsResult<&mut Self>
pub fn extend(&mut self, other: &Series) -> PolarsResult<&mut Self>
Extend the memory backed by this array with the values from other
.
See ChunkedArray::extend
and ChunkedArray::append
.
pub fn sort(&self, reverse: bool) -> Self
sourcepub fn as_single_ptr(&mut self) -> PolarsResult<usize>
pub fn as_single_ptr(&mut self) -> PolarsResult<usize>
Only implemented for numeric types
sourcepub fn cast(&self, dtype: &DataType) -> PolarsResult<Self>
pub fn cast(&self, dtype: &DataType) -> PolarsResult<Self>
Cast [Series]
to another [DataType]
sourcepub fn sum<T>(&self) -> Option<T>where
T: NumCast,
pub fn sum<T>(&self) -> Option<T>where
T: NumCast,
Compute the sum of all values in this Series.
Returns None
if the array is empty or only contains null values.
If the DataType
is one of {Int8, UInt8, Int16, UInt16}
the Series
is
first cast to Int64
to prevent overflow issues.
let s = Series::new("days", &[1, 2, 3]);
assert_eq!(s.sum(), Some(6));
sourcepub fn min<T>(&self) -> Option<T>where
T: NumCast,
pub fn min<T>(&self) -> Option<T>where
T: NumCast,
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));
sourcepub fn max<T>(&self) -> Option<T>where
T: NumCast,
pub fn max<T>(&self) -> Option<T>where
T: NumCast,
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));
sourcepub fn explode(&self) -> PolarsResult<Series>
pub fn explode(&self) -> PolarsResult<Series>
Explode a list or utf8 Series. This expands every item to a new row..
sourcepub fn is_nan(&self) -> PolarsResult<BooleanChunked>
pub fn is_nan(&self) -> PolarsResult<BooleanChunked>
Check if float value is NaN (note this is different than missing/ null)
sourcepub fn is_not_nan(&self) -> PolarsResult<BooleanChunked>
pub fn is_not_nan(&self) -> PolarsResult<BooleanChunked>
Check if float value is NaN (note this is different than missing/ null)
sourcepub fn is_finite(&self) -> PolarsResult<BooleanChunked>
pub fn is_finite(&self) -> PolarsResult<BooleanChunked>
Check if float value is finite
sourcepub fn is_infinite(&self) -> PolarsResult<BooleanChunked>
pub fn is_infinite(&self) -> PolarsResult<BooleanChunked>
Check if float value is infinite
sourcepub fn zip_with(
&self,
mask: &BooleanChunked,
other: &Series
) -> PolarsResult<Series>
Available on crate feature zip_with
only.
pub fn zip_with(
&self,
mask: &BooleanChunked,
other: &Series
) -> PolarsResult<Series>
zip_with
only.Create a new ChunkedArray with values from self where the mask evaluates true
and values
from other
where the mask evaluates false
sourcepub fn to_physical_repr(&self) -> Cow<'_, Series>
pub fn to_physical_repr(&self) -> Cow<'_, Series>
Cast a datelike Series to their physical representation. Primitives remain unchanged
- Date -> Int32
- Datetime-> Int64
- Time -> Int64
- Categorical -> UInt32
sourcepub unsafe fn take_unchecked_threaded(
&self,
idx: &IdxCa,
rechunk: bool
) -> PolarsResult<Series>
pub unsafe fn take_unchecked_threaded(
&self,
idx: &IdxCa,
rechunk: bool
) -> PolarsResult<Series>
Take by index if ChunkedArray contains a single chunk.
Safety
This doesn’t check any bounds. Null validity is checked.
sourcepub fn take_threaded(&self, idx: &IdxCa, rechunk: bool) -> PolarsResult<Series>
pub fn take_threaded(&self, idx: &IdxCa, rechunk: bool) -> PolarsResult<Series>
Take by index. This operation is clone.
Safety
Out of bounds access doesn’t Error but will return a Null value
sourcepub fn filter_threaded(
&self,
filter: &BooleanChunked,
rechunk: bool
) -> PolarsResult<Series>
pub fn filter_threaded(
&self,
filter: &BooleanChunked,
rechunk: bool
) -> PolarsResult<Series>
Filter by boolean mask. This operation clones data.
pub fn dot(&self, other: &Series) -> Option<f64>
dot_product
only.sourcepub fn sum_as_series(&self) -> Series
pub fn sum_as_series(&self) -> Series
Get the sum of the Series as a new Series of length 1.
If the DataType
is one of {Int8, UInt8, Int16, UInt16}
the Series
is
first cast to Int64
to prevent overflow issues.
sourcepub fn cummax(&self, _reverse: bool) -> Series
Available on crate feature cum_agg
only.
pub fn cummax(&self, _reverse: bool) -> Series
cum_agg
only.Get an array with the cumulative max computed at every element
sourcepub fn cummin(&self, _reverse: bool) -> Series
Available on crate feature cum_agg
only.
pub fn cummin(&self, _reverse: bool) -> Series
cum_agg
only.Get an array with the cumulative min computed at every element
sourcepub fn cumsum(&self, reverse: bool) -> Series
Available on crate feature cum_agg
only.
pub fn cumsum(&self, reverse: bool) -> Series
cum_agg
only.Get an array with the cumulative sum computed at every element
If the DataType
is one of {Int8, UInt8, Int16, UInt16}
the Series
is
first cast to Int64
to prevent overflow issues.
sourcepub fn cumprod(&self, reverse: bool) -> Series
Available on crate feature cum_agg
only.
pub fn cumprod(&self, reverse: bool) -> Series
cum_agg
only.Get an array with the cumulative product computed at every element
If the DataType
is one of {Int8, UInt8, Int16, UInt16, Int32, UInt32}
the Series
is
first cast to Int64
to prevent overflow issues.
sourcepub fn product(&self) -> Series
Available on crate feature product
only.
pub fn product(&self) -> Series
product
only.Get the product of an array.
If the DataType
is one of {Int8, UInt8, Int16, UInt16}
the Series
is
first cast to Int64
to prevent overflow issues.
pub fn rank(&self, options: RankOptions) -> Series
rank
only.sourcepub fn strict_cast(&self, data_type: &DataType) -> PolarsResult<Series>
pub fn strict_cast(&self, data_type: &DataType) -> PolarsResult<Series>
Cast throws an error if conversion had overflows
sourcepub fn abs(&self) -> PolarsResult<Series>
Available on crate feature abs
only.
pub fn abs(&self) -> PolarsResult<Series>
abs
only.convert numerical values to their absolute value
pub fn str_value(&self, index: usize) -> Cow<'_, str>
pub fn mean_as_series(&self) -> Series
sourcepub fn unique_stable(&self) -> PolarsResult<Series>
pub fn unique_stable(&self) -> PolarsResult<Series>
Compute the unique elements, but maintain order. This requires more work
than a naive Series::unique
.
pub fn idx(&self) -> PolarsResult<&IdxCa>
sourcepub fn estimated_size(&self) -> usize
pub fn estimated_size(&self) -> usize
Returns an estimation of the total (heap) allocated size of the Series
in bytes.
Implementation
This estimation is the sum of the size of its buffers, validity, including nested arrays.
Multiple arrays may share buffers and bitmaps. Therefore, the size of 2 arrays is not the
sum of the sizes computed from this function. In particular, StructArray
’s size is an upper bound.
When an array is sliced, its allocated size remains constant because the buffer unchanged. However, this function will yield a smaller number. This is because this function returns the visible size of the buffer, not its total capacity.
FFI buffers are included in this estimation.
sourceimpl Series
impl Series
sourcepub fn series_equal(&self, other: &Series) -> bool
pub fn series_equal(&self, other: &Series) -> bool
Check if series are equal. Note that None == None
evaluates to false
sourcepub fn series_equal_missing(&self, other: &Series) -> bool
pub fn series_equal_missing(&self, other: &Series) -> bool
Check if all values in series are equal where None == None
evaluates to true
.
Two Datetime
series are not equal if their timezones are different, regardless
if they represent the same UTC time or not.
sourcepub fn get_data_ptr(&self) -> usize
pub fn get_data_ptr(&self) -> usize
Get a pointer to the underlying data of this Series. Can be useful for fast comparisons.
Methods from Deref<Target = dyn SeriesTrait>
pub fn unpack<N: 'static>(&self) -> PolarsResult<&ChunkedArray<N>>where
N: PolarsDataType,
Trait Implementations
sourceimpl AsMut<Series> for UnstableSeries<'_>
impl AsMut<Series> for UnstableSeries<'_>
sourceimpl AsRef<Series> for UnstableSeries<'_>
impl AsRef<Series> for UnstableSeries<'_>
We don’t implement Deref so that the caller is aware of converting to Series
sourceimpl<'a> AsRef<dyn SeriesTrait + 'a> for Series
impl<'a> AsRef<dyn SeriesTrait + 'a> for Series
sourcefn as_ref(&self) -> &(dyn SeriesTrait + 'a)
fn as_ref(&self) -> &(dyn SeriesTrait + 'a)
sourceimpl<'a> ChunkApply<'a, Series, Series> for ListChunked
impl<'a> ChunkApply<'a, Series, Series> for ListChunked
sourcefn apply<F>(&'a self, f: F) -> Selfwhere
F: Fn(Series) -> Series + Copy,
fn apply<F>(&'a self, f: F) -> Selfwhere
F: Fn(Series) -> Series + Copy,
Apply a closure F
elementwise.
sourcefn apply_with_idx<F>(&'a self, f: F) -> Selfwhere
F: Fn((usize, Series)) -> Series + Copy,
fn apply_with_idx<F>(&'a self, f: F) -> Selfwhere
F: Fn((usize, Series)) -> Series + Copy,
Apply a closure elementwise. The closure gets the index of the element as first argument.
sourcefn apply_with_idx_on_opt<F>(&'a self, f: F) -> Selfwhere
F: Fn((usize, Option<Series>)) -> Option<Series> + Copy,
fn apply_with_idx_on_opt<F>(&'a self, f: F) -> Selfwhere
F: Fn((usize, Option<Series>)) -> Option<Series> + Copy,
Apply a closure elementwise. The closure gets the index of the element as first argument.
sourcefn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S>where
F: Fn(Series) -> S::Native + Copy,
S: PolarsNumericType,
fn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S>where
F: Fn(Series) -> S::Native + Copy,
S: PolarsNumericType,
sourcefn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S>where
F: Fn(Option<Series>) -> S::Native + Copy,
S: PolarsNumericType,
fn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S>where
F: Fn(Option<Series>) -> S::Native + Copy,
S: PolarsNumericType,
fn try_apply<F>(&'a self, f: F) -> PolarsResult<Self>where
F: Fn(Series) -> PolarsResult<Series> + Copy,
sourceimpl ChunkCompare<&Series> for Series
impl ChunkCompare<&Series> for Series
sourcefn equal(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
fn equal(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
Create a boolean mask by checking for equality.
sourcefn not_equal(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
fn not_equal(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
Create a boolean mask by checking for inequality.
sourcefn gt(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
fn gt(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
Create a boolean mask by checking if self > rhs.
sourcefn gt_eq(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
fn gt_eq(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
Create a boolean mask by checking if self >= rhs.
sourcefn lt(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
fn lt(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
Create a boolean mask by checking if self < rhs.
sourcefn lt_eq(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
fn lt_eq(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
Create a boolean mask by checking if self <= rhs.
type Item = Result<ChunkedArray<BooleanType>, PolarsError>
sourcefn eq_missing(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
fn eq_missing(&self, rhs: &Series) -> PolarsResult<BooleanChunked>
sourceimpl ChunkCompare<&str> for Series
impl ChunkCompare<&str> for Series
type Item = Result<ChunkedArray<BooleanType>, PolarsError>
sourcefn eq_missing(&self, rhs: &str) -> PolarsResult<BooleanChunked>
fn eq_missing(&self, rhs: &str) -> PolarsResult<BooleanChunked>
sourcefn equal(&self, rhs: &str) -> PolarsResult<BooleanChunked>
fn equal(&self, rhs: &str) -> PolarsResult<BooleanChunked>
sourcefn not_equal(&self, rhs: &str) -> PolarsResult<BooleanChunked>
fn not_equal(&self, rhs: &str) -> PolarsResult<BooleanChunked>
sourcefn gt(&self, rhs: &str) -> PolarsResult<BooleanChunked>
fn gt(&self, rhs: &str) -> PolarsResult<BooleanChunked>
sourcefn gt_eq(&self, rhs: &str) -> PolarsResult<BooleanChunked>
fn gt_eq(&self, rhs: &str) -> PolarsResult<BooleanChunked>
sourcefn lt(&self, rhs: &str) -> PolarsResult<BooleanChunked>
fn lt(&self, rhs: &str) -> PolarsResult<BooleanChunked>
sourcefn lt_eq(&self, rhs: &str) -> PolarsResult<BooleanChunked>
fn lt_eq(&self, rhs: &str) -> PolarsResult<BooleanChunked>
sourceimpl<Rhs> ChunkCompare<Rhs> for Serieswhere
Rhs: NumericNative,
impl<Rhs> ChunkCompare<Rhs> for Serieswhere
Rhs: NumericNative,
type Item = Result<ChunkedArray<BooleanType>, PolarsError>
sourcefn eq_missing(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
fn eq_missing(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
sourcefn equal(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
fn equal(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
sourcefn not_equal(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
fn not_equal(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
sourcefn gt(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
fn gt(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
sourcefn gt_eq(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
fn gt_eq(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
sourcefn lt(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
fn lt(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
sourcefn lt_eq(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
fn lt_eq(&self, rhs: Rhs) -> PolarsResult<BooleanChunked>
sourceimpl ChunkFillNullValue<&Series> for ListChunked
impl ChunkFillNullValue<&Series> for ListChunked
sourcefn fill_null_with_values(&self, _value: &Series) -> PolarsResult<Self>
fn fill_null_with_values(&self, _value: &Series) -> PolarsResult<Self>
T
.sourceimpl ChunkFull<&Series> for ListChunked
impl ChunkFull<&Series> for ListChunked
sourceimpl ChunkQuantile<Series> for ListChunked
impl ChunkQuantile<Series> for ListChunked
sourcefn median(&self) -> Option<T>
fn median(&self) -> Option<T>
None
if the array is empty or only contains null values. Read moresourcefn quantile(
&self,
_quantile: f64,
_interpol: QuantileInterpolOptions
) -> PolarsResult<Option<T>>
fn quantile(
&self,
_quantile: f64,
_interpol: QuantileInterpolOptions
) -> PolarsResult<Option<T>>
None
if the array is empty or only contains null values. Read moresourceimpl<T: PolarsObject> ChunkQuantile<Series> for ObjectChunked<T>
impl<T: PolarsObject> ChunkQuantile<Series> for ObjectChunked<T>
sourcefn median(&self) -> Option<T>
fn median(&self) -> Option<T>
None
if the array is empty or only contains null values. Read moresourcefn quantile(
&self,
_quantile: f64,
_interpol: QuantileInterpolOptions
) -> PolarsResult<Option<T>>
fn quantile(
&self,
_quantile: f64,
_interpol: QuantileInterpolOptions
) -> PolarsResult<Option<T>>
None
if the array is empty or only contains null values. Read moresourceimpl ChunkVar<Series> for ListChunked
impl ChunkVar<Series> for ListChunked
sourceimpl<T: PolarsObject> ChunkVar<Series> for ObjectChunked<T>
impl<T: PolarsObject> ChunkVar<Series> for ObjectChunked<T>
sourceimpl Deref for Series
impl Deref for Series
type Target = dyn SeriesTrait + 'static
type Target = dyn SeriesTrait + 'static
sourceimpl<T> From<ChunkedArray<T>> for Serieswhere
T: PolarsDataType,
ChunkedArray<T>: IntoSeries,
impl<T> From<ChunkedArray<T>> for Serieswhere
T: PolarsDataType,
ChunkedArray<T>: IntoSeries,
sourcefn from(ca: ChunkedArray<T>) -> Self
fn from(ca: ChunkedArray<T>) -> Self
sourceimpl<'a> FromIterator<&'a bool> for Series
impl<'a> FromIterator<&'a bool> for Series
sourcefn from_iter<I: IntoIterator<Item = &'a bool>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = &'a bool>>(iter: I) -> Self
sourceimpl<'a> FromIterator<&'a f32> for Series
impl<'a> FromIterator<&'a f32> for Series
sourcefn from_iter<I: IntoIterator<Item = &'a f32>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = &'a f32>>(iter: I) -> Self
sourceimpl<'a> FromIterator<&'a f64> for Series
impl<'a> FromIterator<&'a f64> for Series
sourcefn from_iter<I: IntoIterator<Item = &'a f64>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = &'a f64>>(iter: I) -> Self
sourceimpl<'a> FromIterator<&'a i32> for Series
impl<'a> FromIterator<&'a i32> for Series
sourcefn from_iter<I: IntoIterator<Item = &'a i32>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = &'a i32>>(iter: I) -> Self
sourceimpl<'a> FromIterator<&'a i64> for Series
impl<'a> FromIterator<&'a i64> for Series
sourcefn from_iter<I: IntoIterator<Item = &'a i64>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = &'a i64>>(iter: I) -> Self
sourceimpl<'a> FromIterator<&'a str> for Series
impl<'a> FromIterator<&'a str> for Series
sourcefn from_iter<I: IntoIterator<Item = &'a str>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = &'a str>>(iter: I) -> Self
sourceimpl<'a> FromIterator<&'a u32> for Series
impl<'a> FromIterator<&'a u32> for Series
sourcefn from_iter<I: IntoIterator<Item = &'a u32>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = &'a u32>>(iter: I) -> Self
sourceimpl<'a> FromIterator<&'a u64> for Series
impl<'a> FromIterator<&'a u64> for Series
sourcefn from_iter<I: IntoIterator<Item = &'a u64>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = &'a u64>>(iter: I) -> Self
sourceimpl FromIterator<Option<bool>> for Series
impl FromIterator<Option<bool>> for Series
sourceimpl FromIterator<Option<f32>> for Series
impl FromIterator<Option<f32>> for Series
sourceimpl FromIterator<Option<f64>> for Series
impl FromIterator<Option<f64>> for Series
sourceimpl FromIterator<Option<i32>> for Series
impl FromIterator<Option<i32>> for Series
sourceimpl FromIterator<Option<i64>> for Series
impl FromIterator<Option<i64>> for Series
sourceimpl FromIterator<Option<u32>> for Series
impl FromIterator<Option<u32>> for Series
sourceimpl FromIterator<Option<u64>> for Series
impl FromIterator<Option<u64>> for Series
sourceimpl FromIterator<Series> for DataFrame
impl FromIterator<Series> for DataFrame
sourcefn from_iter<T: IntoIterator<Item = Series>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Series>>(iter: T) -> Self
Panics
Panics if Series have different lengths.
sourceimpl FromIterator<String> for Series
impl FromIterator<String> for Series
sourcefn from_iter<I: IntoIterator<Item = String>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = String>>(iter: I) -> Self
sourceimpl FromIterator<bool> for Series
impl FromIterator<bool> for Series
sourcefn from_iter<I: IntoIterator<Item = bool>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = bool>>(iter: I) -> Self
sourceimpl FromIterator<f32> for Series
impl FromIterator<f32> for Series
sourcefn from_iter<I: IntoIterator<Item = f32>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = f32>>(iter: I) -> Self
sourceimpl FromIterator<f64> for Series
impl FromIterator<f64> for Series
sourcefn from_iter<I: IntoIterator<Item = f64>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = f64>>(iter: I) -> Self
sourceimpl FromIterator<i32> for Series
impl FromIterator<i32> for Series
sourcefn from_iter<I: IntoIterator<Item = i32>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = i32>>(iter: I) -> Self
sourceimpl FromIterator<i64> for Series
impl FromIterator<i64> for Series
sourcefn from_iter<I: IntoIterator<Item = i64>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = i64>>(iter: I) -> Self
sourceimpl FromIterator<u32> for Series
impl FromIterator<u32> for Series
sourcefn from_iter<I: IntoIterator<Item = u32>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = u32>>(iter: I) -> Self
sourceimpl FromIterator<u64> for Series
impl FromIterator<u64> for Series
sourcefn from_iter<I: IntoIterator<Item = u64>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = u64>>(iter: I) -> Self
sourceimpl IntoSeries for Series
impl IntoSeries for Series
sourceimpl<T: IntoSeries> NamedFrom<T, T> for Series
impl<T: IntoSeries> NamedFrom<T, T> for Series
For any ChunkedArray
and Series