@Operator public final class DecodeCSV extends PrimitiveOp implements Iterable<Operand<Object>>
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
DecodeCSV.Options
Optional attributes for
DecodeCSV |
operation| Modifier and Type | Method and Description |
|---|---|
static DecodeCSV |
create(Scope scope,
Operand<String> records,
Iterable<Operand<?>> recordDefaults,
DecodeCSV.Options... options)
Factory method to create a class to wrap a new DecodeCSV operation to the graph.
|
static DecodeCSV.Options |
fieldDelim(String fieldDelim) |
Iterator<Operand<Object>> |
iterator() |
static DecodeCSV.Options |
naValue(String naValue) |
List<Output<?>> |
output()
Each tensor will have the same shape as records.
|
static DecodeCSV.Options |
selectCols(List<Long> selectCols) |
static DecodeCSV.Options |
useQuoteDelim(Boolean useQuoteDelim) |
equals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static DecodeCSV create(Scope scope, Operand<String> records, Iterable<Operand<?>> recordDefaults, DecodeCSV.Options... options)
scope - current graph scoperecords - Each string is a record/row in the csv and all records should have
the same format.recordDefaults - One tensor per column of the input record, with either a
scalar default value for that column or an empty vector if the column is
required.options - carries optional attributes valuespublic static DecodeCSV.Options fieldDelim(String fieldDelim)
fieldDelim - char delimiter to separate fields in a record.public static DecodeCSV.Options useQuoteDelim(Boolean useQuoteDelim)
useQuoteDelim - If false, treats double quotation marks as regular
characters inside of the string fields (ignoring RFC 4180, Section 2,
Bullet 5).public static DecodeCSV.Options naValue(String naValue)
naValue - Additional string to recognize as NA/NaN.public static DecodeCSV.Options selectCols(List<Long> selectCols)
selectCols - Copyright © 2015–2019. All rights reserved.