polars.DataFrame.__dataframe__#
- DataFrame.__dataframe__(nan_as_null: bool = False, allow_copy: bool = True) _PyArrowDataFrame [source]#
Convert to a dataframe object implementing the dataframe interchange protocol.
- Parameters:
- nan_as_null
Overwrite null values in the data with
NaN
.- allow_copy
Allow memory to be copied to perform the conversion. If set to False, causes conversions that are not zero-copy to fail.
Notes
Details on the dataframe 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.