Skip to content

Sorting DataFrame that has null values in numerical columns #5655

Closed
@mattfung

Description

@mattfung

Hello,

I found that calling DataFrame.OrderBy on a data frame that has null values in a numeric column throws an ArgumentException with MismatchedColumnLengths error. This occurs regardless of the column to sort by (ie. the column to sort by does not have to be the numeric column).

I believe this is because when the DataFrame clones new sorted columns, numeric columns with null values produce copied clones with length shorter than the original column.

Minimal Example to produce this error (see attached example.csv.txt) txt file because Github does not support csv files -_-

var df = DataFrame.LoadCsv(@"./example.csv.txt");
df.OrderBy("a");

example.csv.txt

Microsoft.Data.Analysis v0.3.0

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions