tf.compat.v1.data.experimental.make_csv_dataset

View source on GitHub

Reads CSV files into a dataset.

tf.compat.v1.data.experimental.make_csv_dataset(
    file_pattern, batch_size, column_names=None, column_defaults=None,
    label_name=None, select_columns=None, field_delim=',', use_quote_delim=True,
    na_value='', header=True, num_epochs=None, shuffle=True,
    shuffle_buffer_size=10000, shuffle_seed=None, prefetch_buffer_size=None,
    num_parallel_reads=None, sloppy=False, num_rows_for_inference=100,
    compression_type=None, ignore_errors=False
)

Reads CSV files into a dataset, where each element is a (features, labels) tuple that corresponds to a batch of CSV rows. The features dictionary maps feature column names to Tensors containing the corresponding feature data, and labels is a Tensor containing the batch's label data.

Args:

Returns:

A dataset, where each element is a (features, labels) tuple that corresponds to a batch of batch_size CSV rows. The features dictionary maps feature column names to Tensors containing the corresponding column data, and labels is a Tensor containing the column data for the label column specified by label_name.

Raises: