Skip to content

Please support NULL values #6659

@simonthum

Description

@simonthum

Describe the bug
Null is basically unsupported. It is hard to filter nulls and much harder to grasp when exactly null is being substituted by default(T).

To Reproduce
Nuget Micorsoft.Data.Analysis 0.20.1:

var coln = new Int32DataFrameColumn("test", new int?[] { -2, null });
var colp = new Int32DataFrameColumn("test2", new int?[] { 2, null });

Console.WriteLine($"linq max: {Enumerable.Max(coln)} mda column max: {coln.Max()}");
Console.WriteLine($"linq avg: {Enumerable.Average(coln)} mda column avg: {coln.Mean()}");
Console.WriteLine($"linq min: {Enumerable.Min(colp)} mda column min: {colp.Min()}");

// output
linq max: -2 mda column max: 0
linq avg: -2 mda column avg: -1
linq min: 2 mda column min: 0

Expected behavior
I would expect most of Dataframe, here Min/Max/Mean, to behave like SQL and LINQ do with regard to NULL values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions