Skip to content

feat: add missing_ok: bool = False kwarg to Table.drop() signature #10709

Open
@NickCrews

Description

@NickCrews

Is your feature request related to a problem?

I have several places where I do:

if "must_not_be_present" in table.columns:
    table.drop("must_not_be_present")
# ...continue on

I want to be able to do non-conditionally: t.drop("must_not_be_present", missing_ok=True)

This is similar to Path.mkdir(exist_ok=True) and Path.unlink(missing_ok=False). These were the inspiration for the name of the param, but I am open to suggestions on different kwarg names. I ran this through chatGPT and other options that were decent were ignore_missing, skip_missing, allow_missing.

What is the motivation behind your request?

No response

Describe the solution you'd like

Adding it as a kwarg argument. This should't be breaking to anyone.

What version of ibis are you running?

main

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

No response

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