Skip to content

Adding Insert() method to DataColumns to allow prepending data #5932

Closed as not planned

Description

@mihakralj

I am replacing a List datatype with DoubleDataFrameColumn datatype in existing app - where the list (holds historical data (for example bars with stock data). List.Insert(0,data) always prepends - it inserts new data on top, using List.Insert() method to insert new data in front instead at the back.

DataFrameColumn (and all other DataFrame types) need Insert() or Prepend() method (just like the List type) alongside currently implemented Append() method, allowing inserting new values to the top of the Column instead of appending data to the bottom.

If DataColumn cannot be assembled and filled in the reverse order (the latest data on top, the oldest at the bottom), the access will require lots of remediation code - checking the length of the Column to get the latest element, calculating the position of elements to get the slice of the last x entries...

Additional context
DoubleDataFrameColumn pd = new("Column");
df.Append(100.0); //appends data to the bottom
df.Insert(200.0,0); // should insert data at the top, just like the List method does

Activity

  1. rosebyte commented on Sep 30, 2026

    @rosebyte
    Member

    Triage: it would make sense, however, we don't see high demand for the change, if you have a real world use case, please create a new issue so we can reconsider.

  2. locked and limited conversation to collaborators on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-DataFrameMicrosoft.Data.Analysis DataFrame APIsyellowmaintenance only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions