Skip to content

DataFrame.explode returns a PY[object] column, even if coercible to something better #372

@xcharleslin

Description

@xcharleslin

To Reproduce

from daft import DataFrame

df = DataFrame.from_pydict({"a": [[1, 2, 3]]})
df = df.explode(df["a"])
df.show()

+--------------+
|            a |
|   PY[object] |
+==============+
|            1 |
+--------------+
|            2 |
+--------------+
|            3 |
+--------------+

# Same result even if the list elements are explicitly e.g. pa.int8()s
# df = DataFrame.from_pydict({"a": [pa.array(list(range(10)), type=pa.int8())]})

Expected behavior

+--------------+
|            a |
|      INTEGER |
+==============+
|            1 |
+--------------+
|            2 |
+--------------+
|            3 |
+--------------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions