Skip to content

BUG: Interchange with Pyarrow types loses validity buffer #56805

@WillAyd

Description

@WillAyd

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

>>> df = pd.DataFrame([[None]], dtype="int32[pyarrow]")
>>> df.__dataframe__().get_column(0).describe_null
(<ColumnNullType.NON_NULLABLE: 0>, None)
>>> df.__dataframe__().get_column(0).get_buffers()
{'data': (PandasBuffer({'bufsize': 8, 'ptr': 100388886100432, 'device': 'CPU'}), (<DtypeKind.INT: 0>, 32, 'i', '=')), 'validity': None, 'offsets': None}

Issue Description

No mention of nullability even though it is

Expected Behavior

We should at least be sending a bit or a byte mask along through the dataframe api

Installed Versions

main

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugInterchangeDataframe Interchange Protocol

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions