Open
Description
System Information (please complete the following information):
- OS & Version: MacOs 15.3.2
- Microsoft.Data.Analysis Version: 0.22.2
- .NET Version: 9.0
Describe the bug
I’ve found a bug in the ElementwiseGreaterThanOrEqual implementation for DateTimeDataFrameColumn. It performs an equality check instead of checking for “greater than or equal”.
To Reproduce
Steps to reproduce the behavior:
- Create a DateTimeDataFrameColumn with some sample DateTime values
- Call the ElementwiseGreaterThanOrEqual method using a value that is less than some of the values in the column
- Observe that only values equal to the given value are marked as true
Expected behavior
ElementwiseGreaterThanOrEqual
should return true
for values that are either equal to or greater than the comparison value.
For example:
- Input: [2020-01-01, 2021-01-01, 2022-01-01]
- Comparison value: 2021-01-01
- Expected result: [false, true, true]
Screenshots, Code, Sample Projects
using Microsoft.Data.Analysis;
using System;
var dates = new DateTimeDataFrameColumn("Dates", new[]
{
new DateTime(2020, 1, 1),
new DateTime(2021, 1, 1),
new DateTime(2022, 1, 1),
});
var result = dates.ElementwiseGreaterThanOrEqual(new DateTime(2021, 1, 1));
Console.WriteLine(result); // Expected: [false, true, true], Actual: [false, true, false]
**Additional context**
-