A coder to encode CSV formatted data.

column_names Tuple of strings. Order must match the order in the file.
schema A Schema proto.
delimiter A one-character string used to separate fields.
secondary_delimiter A one-character string used to separate values within the same field.
multivalent_columns A list of names for multivalent columns that need to be split based on secondary delimiter.

ValueError If schema is invalid.



View source

Encode a tf.transform encoded dict to a csv-formatted string.

instance A python dictionary where the keys are the column names and the values are fixed len or var len encoded features.

A csv-formatted string. The order of the columns is given by column_names.