write_csv

The write_csv method will write a table to a standard CSV file.

Syntax

Note

The deephaven package's write_csv method is identical in function to deephaven.csv.write; however, write_csv is the preferred method as it differentiates the method from deephaven.parquet.write.

Parameters

ParameterTypeDescription
tableTable

The table to write to file.

pathstr

Path name of the file where the table will be stored.

cols optionallist[str]

The source column(s) to include in the CSV file. The default value is all source columns.

Returns

A CSV file located in the specified path.

Examples

Note

Deephaven writes files to locations relative to the base of its Docker container. See Docker data volumes to learn more about the relation between locations in the container and the local file system.

In the following example, write_csv writes the source table to /data/output.csv. All columns are included.

In the following example, only the columns X and Z are written to the output file.