pbspark/_proto.py
def df_from_protobuf(
        self,
        df: DataFrame,
        message_type: t.Type[Message],
        options: t.Optional[dict] = None,
        expanded: bool = False,
    ) -> DataFrame:
        """Decode a dataframe of encoded protobuf.

        If expanded, return a dataframe in which each field is its own column. Otherwise
        return a dataframe with a single struct column named `value`.
        """
        df_decoded = df.select(
            self.from_protobuf(df.columns[0], message_type, options).alias("value")
        )
        if expanded:
            df_decoded = df_decoded.select("value.*")
        return df_decoded
Decode a dataframe of encoded protobuf.

        If expanded, return a dataframe in which each field is its own column. Otherwise
        return a dataframe with a single struct column named `value`.
        
Decode a dataframe of encoded protobuf.
If expanded, return a dataframe in which each field is its own column. Otherwise
return a dataframe with a single struct column named `value`.
Decode a dataframe of encoded protobuf . If expanded return a dataframe in which each field is its own column . Otherwise return a dataframe with a single struct column named ` value ` .
def df_from_protobuf(
        self,
        df: DataFrame,
        message_type: t.Type[Message],
        options: t.Optional[dict] = None,
        expanded: bool = False,
    ) -> DataFrame:
        df_decoded = df.select(
            self.from_protobuf(df.columns[0], message_type, options).alias("value")
        )
        if expanded:
            df_decoded = df_decoded.select("value.*")
        return df_decoded
def df_from_protobuf ( self , df : DataFrame , message_type : t . Type [ Message ] , options : t . Optional [ dict ] = None , expanded : bool = False , ) -> DataFrame : df_decoded = df . select ( self . from_protobuf ( df . columns [ 0 ] , message_type , options ) . alias ( "value" ) ) if expanded : df_decoded = df_decoded . select ( "value.*" ) return df_decoded
Decode a dataframe of encoded protobuf.
Decode a dataframe of encoded protobuf .
"""Decode a dataframe of encoded protobuf.

        If expanded, return a dataframe in which each field is its own column. Otherwise
        return a dataframe with a single struct column named `value`.
        """
self
df
DataFrame
message_type
t.Type[Message]
options
t.Optional[dict]
expanded
bool