Skip to content

Deprecate native_namespace in favour of backend in IO functions #1888

@MarcoGorelli

Description

@MarcoGorelli

native_namespace is annoyingly long, and retrieving native namespaces can be tedious

I think from_dict (and other IO functions) could have a backend: ModuleType | Implementation | EagerBackend argument, so all of the following could be supported:

data = {'a': [1,2,3], 'b': [4,5,6]}

nw.from_dict(data, backend=pyarrow)
nw.from_dict(data, backend='pyarrow')
nw.from_dict(data, backend=nw.Implementation.PYARROW)

EagerBackend could be Literal['pandas', 'polars', 'pyarrow']

Tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    api designhigh priorityYour PR will be reviewed very quickly if you address this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions