Skip to content

Warning when using polars expressions #77

@BielStela

Description

@BielStela

Hello!
When using the polars expression interface a new warning MapWithoutReturnDtypeWarning appears:

>>> import polars as pl
>>> import h3ronpy.polars
>>> df = pl.DataFrame({"cell":["86b375d77ffffff","865f00027ffffff"]})
>>> df.select(pl.col("cell").h3.cells_parse())
<python-input-3>:1: MapWithoutReturnDtypeWarning: 'return_dtype' of function python_udf must be set

A later expression might fail because the output type is not known. Set return_dtype=pl.self_dtype() if the type is unchanged, or set the proper output data type.
  df.select(pl.col("cell").h3.cells_parse())
shape: (2, 1)
┌────────────────────┐
│ cell               │
│ ---                │
│ u64                │
╞════════════════════╡
│ 606639449396215807 │
│ 605153608412954623 │
└────────────────────┘

Using versions:

>>> pl.__version__
'1.32.2'
>>> h3ronpy.__version__
'0.22.0'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions