You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rust and Python versions support nearest asof join strategy, while nodejs version does not yet. It would be great if nodejs version do as well. I'm working on this feature, and following are possible changes and test cases.
letgdp=pl.DataFrame({date: [newDate('2016-01-01'),newDate('2017-01-01'),newDate('2018-01-01'),newDate('2019-01-01'),],// note record date: Jan 1st (sorted!)gdp: [4164,4411,4566,4696],})letpopulation=pl.DataFrame({date: [newDate('2016-05-12'),newDate('2017-05-12'),newDate('2017-10-12'),newDate('2018-05-12'),newDate('2018-10-12'),newDate('2019-05-12'),],// note record date: May 12th (sorted!)"population": [82.19,82.66,82.95,83.12,83.37,83.52],})population.joinAsof(gdp,{leftOn:"date",rightOn:"date",strategy:"nearest"})
Describe your feature request
Rust and Python versions support
nearest
asof join strategy, while nodejs version does not yet. It would be great if nodejs version do as well. I'm working on this feature, and following are possible changes and test cases.Possible changes
src/lazy/dataframe.rs
let strategy = match strategy.as_ref() { "forward" => AsofStrategy::Forward, "backward" => AsofStrategy::Backward, + "nearest" => AsofStrategy::Nearest, _ => panic!("expected one of {{'forward', 'backward'}}"), };
polars/lazy/dataframe.ts
polars/dataframe.ts
Test cases
It should output
The text was updated successfully, but these errors were encountered: