diff --git a/crates/nu-cmd-dataframe/src/dataframe/values/nu_dataframe/between_values.rs b/crates/nu-cmd-dataframe/src/dataframe/values/nu_dataframe/between_values.rs index be6efe3c4f..fab201cf9a 100644 --- a/crates/nu-cmd-dataframe/src/dataframe/values/nu_dataframe/between_values.rs +++ b/crates/nu-cmd-dataframe/src/dataframe/values/nu_dataframe/between_values.rs @@ -84,27 +84,27 @@ pub(super) fn compute_between_series( } Operator::Comparison(Comparison::NotEqual) => { let name = format!("neq_{}_{}", lhs.name(), rhs.name()); - let res = compare_series(lhs, rhs, name.as_str(), right.span(), Series::equal)?; + let res = compare_series(lhs, rhs, name.as_str(), right.span(), Series::not_equal)?; NuDataFrame::series_to_value(res, operation_span) } Operator::Comparison(Comparison::LessThan) => { let name = format!("lt_{}_{}", lhs.name(), rhs.name()); - let res = compare_series(lhs, rhs, name.as_str(), right.span(), Series::equal)?; + let res = compare_series(lhs, rhs, name.as_str(), right.span(), Series::lt)?; NuDataFrame::series_to_value(res, operation_span) } Operator::Comparison(Comparison::LessThanOrEqual) => { let name = format!("lte_{}_{}", lhs.name(), rhs.name()); - let res = compare_series(lhs, rhs, name.as_str(), right.span(), Series::equal)?; + let res = compare_series(lhs, rhs, name.as_str(), right.span(), Series::lt_eq)?; NuDataFrame::series_to_value(res, operation_span) } Operator::Comparison(Comparison::GreaterThan) => { let name = format!("gt_{}_{}", lhs.name(), rhs.name()); - let res = compare_series(lhs, rhs, name.as_str(), right.span(), Series::equal)?; + let res = compare_series(lhs, rhs, name.as_str(), right.span(), Series::gt)?; NuDataFrame::series_to_value(res, operation_span) } Operator::Comparison(Comparison::GreaterThanOrEqual) => { let name = format!("gte_{}_{}", lhs.name(), rhs.name()); - let res = compare_series(lhs, rhs, name.as_str(), right.span(), Series::equal)?; + let res = compare_series(lhs, rhs, name.as_str(), right.span(), Series::gt_eq)?; NuDataFrame::series_to_value(res, operation_span) } Operator::Boolean(Boolean::And) => match lhs.dtype() { @@ -768,3 +768,117 @@ fn add_string_to_series(series: &Series, pat: &str, span: Span) -> Result