docs: def toPandas(self):
          """
          Return a pandas DataFrame with the DataFrame data.
          """
          assert pd is not None
          nindices = self.getNumIndices()
          headers = self.getHeaders()
          columns = {
              header: list(self.getColumn(header))
              for header in headers[nindices:]
          }
          index = zip(*[
              list(self.getColumn(header))
              for header in headers[:nindices]
          ])
          index = [key if len(key) > 1 else key[0] for key in index]
          if index == []:
              return pd.DataFrame(columns, index=None)
          else:
              return pd.DataFrame(columns, index=index)