MCPcopy Create free account
hub / github.com/apache/arrow / __dataframe__

Method __dataframe__

python/pyarrow/interchange/dataframe.py:67–81  ·  view source on GitHub ↗

Construct a new exchange object, potentially changing the parameters. ``nan_as_null`` is a keyword intended for the consumer to tell the producer to overwrite null values in the data with ``NaN``. It is intended for cases where the consumer does not support the bit

(
        self, nan_as_null: bool = False, allow_copy: bool = True
    )

Source from the content-addressed store, hash-verified

65 self._allow_copy = allow_copy
66
67 def __dataframe__(
68 self, nan_as_null: bool = False, allow_copy: bool = True
69 ) -> _PyArrowDataFrame:
70 """
71 Construct a new exchange object, potentially changing the parameters.
72 ``nan_as_null`` is a keyword intended for the consumer to tell the
73 producer to overwrite null values in the data with ``NaN``.
74 It is intended for cases where the consumer does not support the bit
75 mask or byte mask that is the producer's native representation.
76 ``allow_copy`` is a keyword that defines whether or not the library is
77 allowed to make a copy of the data. For example, copying data would be
78 necessary if a library supports strided buffers, given that this
79 protocol specifies contiguous buffers.
80 """
81 return _PyArrowDataFrame(self._df, nan_as_null, allow_copy)
82
83 @property
84 def metadata(self) -> dict[str, Any]:

Calls 1

_PyArrowDataFrameClass · 0.85