Skip to content

Adding new column to empty DataFrame fails #6694

Description

@asmirnov82

Describe the bug
Empty DataFrame fails on adding new column with exception:
System.ArgumentException: Column length are mismatched Parameter name; column

To Reproduce

DataFrameColumn intColumn1 = new Int32DataFrameColumn("IntColumn_1", Enumerable.Range(0, 10).Select(x => x));
DataFrameColumn intColumn2 = new Int32DataFrameColumn("IntColumn_2", Enumerable.Range(0, 11).Select(x => x));

DataFrame dataFrame = new DataFrame();

//Add and remove column with length = 10
dataFrame.Columns.Add(intColumn1);
dataFrame.Columns.Remove(intColumn1);

//Now dataframe is empty, attemp to add column with lenght = 11 leads to exception
dataFrame.Columns.Add(intColumn2);

Expected behavior
Column should be added without any exception

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