DataFrame.__dataframe__(nan_as_null=False, allow_copy=True)[source]

Return the dataframe exchange object implementing the exchange protocol.

nan_as_nullbool, default False

Whether to tell the DataFrame to overwrite null values in the data with NaN (or NaT).

allow_copybool, default True

Whether to allow memory copying when exporting. If set to False it would cause non-zero-copy exports to fail.

DataFrame exchange object

The object which consuming library can use to ingress the dataframe.


Details on the exchange protocol:

nan_as_null currently has no effect; once support for nullable extension dtypes is added, this value should be propagated to columns.