tf.io.decode_csv

View source on GitHub

Convert CSV records to tensors. Each column maps to one tensor.

tf.io.decode_csv(
    records, record_defaults, field_delim=',', use_quote_delim=True, na_value='',
    select_cols=None, name=None
)

RFC 4180 format is expected for the CSV records. (https://tools.ietf.org/html/rfc4180) Note that we allow leading and trailing spaces with int or float field.

Args:

Returns:

A list of Tensor objects. Has the same type as record_defaults. Each tensor will have the same shape as records.

Raises: