pandas.api.exchange.from_dataframe

pandas.api.exchange.from_dataframe(df, allow_copy=True)[source]

Build a pd.DataFrame from any DataFrame supporting the interchange protocol.

Parameters
dfDataFrameXchg

Object supporting the exchange protocol, i.e. __dataframe__ method.

allow_copybool, default: True

Whether to allow copying the memory to perform the conversion (if false then zero-copy approach is requested).

Returns
pd.DataFrame