0

I've my data in form of a string seperated by \ character (for columns) & by new line \n character for rows.

ID\Product\quantity\n1\xx\2

Looks like Dask.array.from_array() support only a array as input.

Although I can convert the above text to np.array using

np.array([i.split("\t") for i in data[1].split("\n")])

Wondering if there is something equivalent to directly convert the string into dask array or dataframe.

1 Answers1

0

You may want the dask.dataframe.read_csv function

import dask.dataframe as dd
df = dd.read_csv('filename.*.csv', sep='\t')
MRocklin
  • 55,641
  • 23
  • 163
  • 235