On this page
pandas.DataFrame.__dataframe__
- DataFrame.__dataframe__(nan_as_null=False, allow_copy=True)[source]
-
Return the dataframe interchange object implementing the interchange protocol.
- Parameters
-
- nan_as_null:bool, default False
-
Whether to tell the DataFrame to overwrite null values in the data with
NaN
(orNaT
). - allow_copy:bool, default True
-
Whether to allow memory copying when exporting. If set to False it would cause non-zero-copy exports to fail.
- Returns
-
- DataFrame interchange object
-
The object which consuming library can use to ingress the dataframe.
Notes
Details on the interchange protocol: https://data-apis.org/dataframe-protocol/latest/index.html
nan_as_null currently has no effect; once support for nullable extension dtypes is added, this value should be propagated to columns.
© 2008–2022, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.5.0/reference/api/pandas.DataFrame.__dataframe__.html