h3ronpy icon indicating copy to clipboard operation
h3ronpy copied to clipboard

Warning when using polars expressions

Open BielStela opened this issue 5 months ago • 0 comments

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'

BielStela avatar Aug 11 '25 11:08 BielStela