Conversation

MarcoGorelli

On main, the following doesn't raise:

import pyarrow as pa
import pyarrow.compute as pc

n_legs = pa.chunked_array([[2, 2, 4], [4, 5, 100]])
names = ["n_legs"]
table = pa.table([n_legs], names=names)

pd.api.interchange.from_dataframe(table, allow_copy=False)

Comment on lines +456 to +458
if length > 0:
return np.ctypeslib.as_array(data_pointer, shape=(length,))
return np.array([], dtype=ctypes_type)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated, but this silences a warning

@mroeschkemroeschke added the InterchangeDataframe Interchange Protocollabel Jul 31, 2023
@mroeschkemroeschke added this to the 2.1 milestone Jul 31, 2023
@mroeschkemroeschke merged commit d1dd468 into pandas-dev:main Jul 31, 2023
@mroeschke

Nice thanks @MarcoGorelli

Sign up for free to join this conversation on . Already have an account? Sign in to comment
InterchangeDataframe Interchange Protocol
None yet

Successfully merging this pull request may close these issues.