pbspark/_proto.py
def df_to_protobuf(
    df: DataFrame,
    message_type: t.Type[Message],
    options: t.Optional[dict] = None,
    expanded: bool = False,
    mc: MessageConverter = None,
) -> DataFrame:
    """Encode data in a dataframe to protobuf as column `value`.

    If `expanded`, the passed dataframe columns will be packed into a struct before
    converting. Otherwise it is assumed that the dataframe passed is a single column
    of data already packed into a struct.

    Returns a dataframe with a single column named `value` containing encoded data.
    """
    mc = mc or MessageConverter()
    return mc.df_to_protobuf(
        df=df, message_type=message_type, options=options, expanded=expanded
    )
Encode data in a dataframe to protobuf as column `value`.

    If `expanded`, the passed dataframe columns will be packed into a struct before
    converting. Otherwise it is assumed that the dataframe passed is a single column
    of data already packed into a struct.

    Returns a dataframe with a single column named `value` containing encoded data.
    
Encode data in a dataframe to protobuf as column `value`.
If `expanded`, the passed dataframe columns will be packed into a struct before
converting. Otherwise it is assumed that the dataframe passed is a single column
of data already packed into a struct.

Returns a dataframe with a single column named `value` containing encoded data.
Encode data in a dataframe to protobuf as column ` value ` . If ` expanded ` the passed dataframe columns will be packed into a struct before converting . Otherwise it is assumed that the dataframe passed is a single column of data already packed into a struct . Returns a dataframe with a single column named ` value ` containing encoded data .
def df_to_protobuf(
    df: DataFrame,
    message_type: t.Type[Message],
    options: t.Optional[dict] = None,
    expanded: bool = False,
    mc: MessageConverter = None,
) -> DataFrame:
    mc = mc or MessageConverter()
    return mc.df_to_protobuf(
        df=df, message_type=message_type, options=options, expanded=expanded
    )
def df_to_protobuf ( df : DataFrame , message_type : t . Type [ Message ] , options : t . Optional [ dict ] = None , expanded : bool = False , mc : MessageConverter = None , ) -> DataFrame : mc = mc or MessageConverter ( ) return mc . df_to_protobuf ( df = df , message_type = message_type , options = options , expanded = expanded )
Encode data in a dataframe to protobuf as column `value`.
Encode data in a dataframe to protobuf as column ` value ` .
"""Encode data in a dataframe to protobuf as column `value`.

    If `expanded`, the passed dataframe columns will be packed into a struct before
    converting. Otherwise it is assumed that the dataframe passed is a single column
    of data already packed into a struct.

    Returns a dataframe with a single column named `value` containing encoded data.
    """
df
DataFrame
message_type
t.Type[Message]
options
t.Optional[dict]
expanded
bool
mc
MessageConverter