Skip to content

Add a feature for inserting a column #314

Open
@goodPointP

Description

@goodPointP

It would be really useful if there was a method that could insert a column into an existing Dataframe between two existing columns. I know about .addColumn, but that seems to place the new column at the end of the Dataframe.

For example:

df.print()

A | B 
======
7 | 5
3 | 6

df.insert({ "afterColumn": "A", "newColumnName": "C", "data": [4,1], inplace: true })
df.print()

A | C | B 
==========
7 | 4 | 5
3 | 1 | 6

Metadata

Metadata

Assignees

Labels

Some day maybeWe might consider adding/fixing this in the futureenhancementNew feature or requestgood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions