pub struct MergeAsofOptions {
pub allow_exact_matches: bool,
pub tolerance: Option<f64>,
pub by: Option<Vec<String>>,
pub left_by: Option<Vec<String>>,
pub right_by: Option<Vec<String>>,
pub suffixes: Option<[Option<String>; 2]>,
}Expand description
Options for asof merge operations.
Matches pandas merge_asof parameters:
allow_exact_matches: If true (default), allow matching with same key valuetolerance: Maximum distance between keys for a matchby: Columns to match exactly before asof matching
Fields§
§allow_exact_matches: boolIf true (default), allow matching with the same ‘on’ value. If false, don’t match rows where left key == right key exactly.
tolerance: Option<f64>Maximum distance between left and right keys for a valid match. None means no tolerance limit.
by: Option<Vec<String>>Columns to match exactly before performing asof merge. Acts like an equi-join on these columns first.
left_by: Option<Vec<String>>Left grouping columns when the two sides use different names.
Must be paired with right_by and cannot be combined with by.
right_by: Option<Vec<String>>Right grouping columns, matched positionally to left_by.
suffixes: Option<[Option<String>; 2]>Suffixes for overlapping non-shared-key columns, as in merge.
None uses ("_x", "_y").
Implementations§
Source§impl MergeAsofOptions
impl MergeAsofOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Create options with defaults matching pandas behavior.
Examples found in repository?
More examples
Sourcepub fn allow_exact_matches(self, allow: bool) -> Self
pub fn allow_exact_matches(self, allow: bool) -> Self
Set whether exact matches are allowed.
Trait Implementations§
Source§impl Clone for MergeAsofOptions
impl Clone for MergeAsofOptions
Source§impl Debug for MergeAsofOptions
impl Debug for MergeAsofOptions
Auto Trait Implementations§
impl Forget for MergeAsofOptions
impl Freeze for MergeAsofOptions
impl Move for MergeAsofOptions
impl RefUnwindSafe for MergeAsofOptions
impl Send for MergeAsofOptions
impl Sync for MergeAsofOptions
impl Unpin for MergeAsofOptions
impl UnsafeUnpin for MergeAsofOptions
impl UnwindSafe for MergeAsofOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more