def transform_dataframe(self, dataframe):
        """
        Unstack the dataframe so header fields are across the top.
        """
        dataframe.columns.name = ""

        for i in range(len(self.get_header_fields())):
            dataframe = dataframe.unstack()

        # Remove blank rows / columns
        dataframe = dataframe.dropna(
            axis=0, how='all'
        ).dropna(
            axis=1, how='all'
        )
        return dataframe
def transform_dataframe ( self , dataframe ) : dataframe . columns . name = "" for i in range ( len ( self . get_header_fields ( ) ) ) : dataframe = dataframe . unstack ( ) dataframe = dataframe . dropna ( axis = 0 , how = 'all' ) . dropna ( axis = 1 , how = 'all' ) return dataframe
Unstack the dataframe so header fields are across the top.