nums.api module

nums.api.delete(filename)[source]
Parameters

filename (str) – The name of the file to delete. This must be a file previously written to disk.

Return type

bool

Returns

A BlockArray indicating the outcome of this operation.

nums.api.from_modin(df)[source]
nums.api.init(address=None, num_cpus=None, cluster_shape=None)[source]
nums.api.read(filename)[source]
Parameters

filename (str) – The name of the file to read. This must be the name of an array that was previously written using the nums.write command.

Return type

BlockArray

Returns

A BlockArray instance.

nums.api.read_csv(filename, dtype=<class 'float'>, delimiter=', ', has_header=False)[source]

Read a csv text file.

Parameters
  • filename – The filename of the csv.

  • dtype – The data type of the csv file’s entries.

  • delimiter – The value delimiter for each row; usually a comma.

  • has_header – Whether the csv file has a header. The header is discarded.

Return type

BlockArray

Returns

A BlockArray instance.

nums.api.write(filename, ba)[source]
Parameters
  • filename (str) – The name of the file to write. Supports the s3 protocol.

  • ba (BlockArray) – The BlockArray instance to write.

Return type

BlockArray

Returns

A BlockArray indicating the outcome of this operation.