docarray.array.mixins.io.dataframe module#

class docarray.array.mixins.io.dataframe.DataframeIOMixin[source]#

Bases: object

Save/load from pandas.dataframe

Note

These functions require you to install pandas

to_dataframe(**kwargs)[source]#

Export itself to a pandas.DataFrame object.

Parameters:

kwargs – the extra kwargs will be passed to pandas.DataFrame.from_dict().

Return type:

DataFrame

Returns:

a pandas.DataFrame object

classmethod from_dataframe(df, *args, **kwargs)[source]#

Import a DocumentArray from a pandas.DataFrame object.

Parameters:

df (DataFrame) – a pandas.DataFrame object.

Return type:

T

Returns:

a DocumentArray object