code: def transform_dataframe(self, dataframe):
          
          coord_fields = self.get_coord_fields()
          header_fields = self.get_header_fields()
  
          # Remove any pairs that don't have data for both x & y
          for i in range(len(coord_fields)):
              dataframe = dataframe.unstack()
          dataframe = dataframe.dropna(axis=1, how='all')
          dataframe = dataframe.dropna(axis=0, how='any')
  
          # Unstack series header
          for i in range(len(header_fields)):
              dataframe = dataframe.unstack()
  
          # Compute new column headers
          columns = []
          for i in range(len(header_fields) + 1):
              columns.append([])
  
          for col in dataframe.columns:
              value_name = col[0]
              coord_names = list(col[1:len(coord_fields) + 1])
              header_names = list(col[len(coord_fields) + 1:])
              coord_name = ''
              for name in coord_names:
                  if name != self.index_none_value:
                      coord_name += name + '-'
              coord_name += value_name
              columns[0].append(coord_name)
              for i, header_name in enumerate(header_names):
                  columns[1 + i].append(header_name)
  
          dataframe.columns = columns
          dataframe.columns.names = [''] + header_fields
  
          return dataframe
docs: Unstack the dataframe so header consists of a composite 'value' header
          plus any other header fields.