ds_resource_plugin_py_lib.common.serde.serialize.awswrangler

File: awswrangler.py Region: ds_resource_plugin_py_lib/common/serde/serialize

Description

Serialize a pandas DataFrame into a value using awswrangler.

Example

from ds_resource_plugin_py_lib.common.serde.serialize.awswrangler import AwsWranglerSerializer
from ds_resource_plugin_py_lib.common.resource.dataset.storage_format import DatasetStorageFormatType

serializer = AwsWranglerSerializer(format=DatasetStorageFormatType.CSV)
result = serializer(df, boto3_session=boto3_session)

Attributes

logger

Classes

AwsWranglerSerializer

Extensible class to serialize dataset content.

Module Contents

ds_resource_plugin_py_lib.common.serde.serialize.awswrangler.logger
class ds_resource_plugin_py_lib.common.serde.serialize.awswrangler.AwsWranglerSerializer[source]

Bases: ds_resource_plugin_py_lib.common.serde.serialize.base.DataSerializer

Extensible class to serialize dataset content.

Convert obj to bytes.

Not supposed to be used directly, but to be subclassed.

format: ds_resource_plugin_py_lib.common.resource.dataset.storage_format.DatasetStorageFormatType
kwargs: dict[str, Any]
__call__(obj: pandas.DataFrame, **kwargs: Any) Any[source]

Serialize a pandas DataFrame into a value. :param obj: The pandas DataFrame to serialize. :param **kwargs: Additional keyword arguments.

Returns:

A value.