CSVDeserializer: Deserialize a stream of bytes into a list of lists.

CSVDeserializerR Documentation

Deserialize a stream of bytes into a list of lists.

Description

Consider using NumpyDeserializer or DataTableDeserializer or TibbleDeserializer instead, if you'd like to convert text/csv responses directly into other data types.

Super classes

sagemaker.mlcore::BaseDeserializer -> sagemaker.mlcore::SimpleBaseDeserializer -> CSVDeserializer

Public fields

encoding

string encoding to be used

Methods

Public methods

Inherited methods

Method new()

Initialize a “CSVDeserializer“ instance.

Usage
CSVDeserializer$new(encoding = "UTF-8", accept = "text/csv")
Arguments
encoding

(str): The string encoding to use (default: "UTF-8").

accept

(union[str, tuple[str]]): The MIME type (or tuple of allowable MIME types) that is expected from the inference endpoint (default: "text/csv").


Method deserialize()

Takes raw data stream and deserializes it.

Usage
CSVDeserializer$deserialize(stream, content_type)
Arguments
stream

raw data to be deserialize

content_type

(str): The MIME type of the data.

Returns

list: The data deserialized into a list of lists representing the contents of a CSV file.


Method clone()

The objects of this class are cloneable with this method.

Usage
CSVDeserializer$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other serializer: BaseDeserializer, BaseSerializer, BytesDeserializer, CSVSerializer, DataTableDeserializer, IdentitySerializer, JSONDeserializer, JSONLinesDeserializer, JSONLinesSerializer, JSONSerializer, LibSVMSerializer, NumpyDeserializer, NumpySerializer, SimpleBaseDeserializer, SimpleBaseSerializer, SparseMatrixSerializer, StringDeserializer, TibbleDeserializer


DyfanJones/sagemaker-r-mlcore documentation built on May 3, 2022, 10:08 a.m.