@Operator(group="io") 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 wrapping a new DecodeCsv operation.
|
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, op, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static DecodeCsv create(Scope scope, Operand<String> records, Iterable<Operand<?>> recordDefaults, DecodeCsv.Options... options)
scope
- current 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 © 2022. All rights reserved.