classmethod Series.from_numpy(data: numpy.ndarray, name: str = 'numpy_series') daft.series.Series[source]#

Construct a Series from a NumPy ndarray.

If the provided NumPy ndarray is 1-dimensional, Daft will attempt to store the ndarray in a pyarrow Array. If the ndarray has more than 1 dimension OR storing the 1D array in Arrow failed, Daft will store the ndarray data as a Python list of NumPy ndarrays.

  • data – The NumPy ndarray whose data we wish to put in the Series.

  • name – The name associated with the Series; this is usually the column name.