Skip to content

[Python] Can't convert from df column with type uuid.UUID to str #44224

Description

@davidsteinar

Describe the bug, including details regarding any error messages, version, and platform.

See reproducible example:

import pandas as pd
import uuid
import pyarrow as pa
# Create a DataFrame with UUID objects
data = {'MUID': [uuid.uuid4() for _ in range(5)],
'Data': range(5)}
df = pd.DataFrame(data)
# Convert the DataFrame to an Arrow table
table = pa.Table.from_pandas(df)
>>> ArrowInvalid: ("Could not convert UUID('ffb0c97b-7a25-4fce-9e4e-645715ca5ae8') with type UUID: did not recognize Python value type when inferring an Arrow data type", 'Conversion failed for column MUID with type object')

Component(s)

Python

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions