pbspark/_proto.py
def to_protobuf(
        self,
        data: t.Union[Column, str],
        message_type: t.Type[Message],
        options: t.Optional[dict] = None,
    ) -> Column:
        """Serialize spark structs to protobuf messages.

        Given a column and protobuf message type, serialize
        protobuf messages also using our custom serializers.

        The ``options`` arg should be a dictionary for the kwargs passed
        our parse_dict (same args as protobuf's ParseDict).
        """
        column = col(data) if isinstance(data, str) else data
        protobuf_encoder_udf = self.get_encoder_udf(message_type, options)
        return protobuf_encoder_udf(column)
Serialize spark structs to protobuf messages.

        Given a column and protobuf message type, serialize
        protobuf messages also using our custom serializers.

        The ``options`` arg should be a dictionary for the kwargs passed
        our parse_dict (same args as protobuf's ParseDict).
        
Serialize spark structs to protobuf messages.
Given a column and protobuf message type, serialize
protobuf messages also using our custom serializers.

The ``options`` arg should be a dictionary for the kwargs passed
our parse_dict (same args as protobuf's ParseDict).
Serialize spark structs to protobuf messages . Given a column and protobuf message type serialize protobuf messages also using our custom serializers . The ` ` options ` ` arg should be a dictionary for the kwargs passed our parse_dict ( same args as protobuf ' s ParseDict ) .
def to_protobuf(
        self,
        data: t.Union[Column, str],
        message_type: t.Type[Message],
        options: t.Optional[dict] = None,
    ) -> Column:
        column = col(data) if isinstance(data, str) else data
        protobuf_encoder_udf = self.get_encoder_udf(message_type, options)
        return protobuf_encoder_udf(column)
def to_protobuf ( self , data : t . Union [ Column , str ] , message_type : t . Type [ Message ] , options : t . Optional [ dict ] = None , ) -> Column : column = col ( data ) if isinstance ( data , str ) else data protobuf_encoder_udf = self . get_encoder_udf ( message_type , options ) return protobuf_encoder_udf ( column )
Serialize spark structs to protobuf messages.
Serialize spark structs to protobuf messages .
"""Serialize spark structs to protobuf messages.

        Given a column and protobuf message type, serialize
        protobuf messages also using our custom serializers.

        The ``options`` arg should be a dictionary for the kwargs passed
        our parse_dict (same args as protobuf's ParseDict).
        """
self
data
t.Union[Column, str]
message_type
t.Type[Message]
options
t.Optional[dict]