daft.DataFrame.from_pydict#

classmethod DataFrame.from_pydict(data: dict[str, list]) daft.dataframe.dataframe.DataFrame[source]#

Creates a DataFrame from a Python dictionary

Example

>>> df = DataFrame.from_pydict({"foo": [1, 2]})
Parameters

data – Key -> Sequence[item] of data. Each Key is created as a column, and must have a value that is a Python list. Values must be equal in length across all keys.

Returns

DataFrame created from dictionary of columns

Return type

DataFrame