Allow construction of PySeries
from memory buffers
#10718
Labels
A-interchange
Area: Python dataframe interchange protocol
accepted
Ready for implementation
enhancement
New feature or an improvement of an existing feature
Milestone
Blocker for #10701
We're trying to create a Polars DataFrame from an interchange object, which is basically just a description of where stuff is in memory.
I would propose the following functionality, which should operate in a zero-copy manner.
1.
PySeries.from_buffer
(DONE)Args
dtype
: physical data typepointer
: memory address of the start of the buffer (e.g. some integer)length
: number of elements in the bufferoffset
: possible offset in bits from the start of the bufferbase
: Object holding the buffer, typically this will be some unknown/foreign objectExample
2.
PySeries.from_buffers
Args
dtype
: data typedata_buffer
: PySeries containing the physical representation of the datavalidity_buffer
: Optional PySeries bitmaskoffsets_buffer
: Optional PySeries of typeInt64
Example
References
The text was updated successfully, but these errors were encountered: