Skip to content

feat: Functionality to insert external columns #11369

Open
@vspinu

Description

@vspinu

Is your feature request related to a problem?

I cannot find a way to insert a complete new column into a table. ibis.literal causes the entire colum to be inserted as value in each row.

    duck = ibis.duckdb.connect(":memory:")
    tbl = duck.create_table("test", {
        'id': [1, 2],
        'value': [10, 20]
    }, overwrite=True)

    tbl.mutate(new=ibis.literal(["a", "b"])) # or
    tbl.mutate(new=["a", "b"])


   id  value     new
0   1     10  [a, b]
1   2     20  [a, b]

Describe the solution you'd like

One idea would be to follow pandas and polars and have ibis.series constructor for such cases.

What version of ibis are you running?

10.5.0

What backend(s) are you using, if any?

duckd, polars etc

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeatures or general enhancements

    Type

    No type

    Projects

    Status

    backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions