code: def test_transpose(self):
      # TODO: what if with random index?
      pdf1 = pd.DataFrame(
          data={"col1": [1, 2], "col2": [3, 4]},
          columns=["col1", "col2"],
      )
      psdf1 = ps.from_pandas(pdf1)
  
      pdf2 = pd.DataFrame(
          data={"score": [9, 8], "kids": [0, 0], "age": [12, 22]},
          columns=["score", "kids", "age"],
      )
      psdf2 = ps.from_pandas(pdf2)
  
      self.assert_eq(
          pdf1.transpose().sort_index(), psdf1.transpose().sort_index()
      )
      self.assert_eq(
          pdf2.transpose().sort_index(), psdf2.transpose().sort_index()
      )
  
      with option_context("compute.max_rows", None):
          self.assert_eq(
              pdf1.transpose().sort_index(),
              psdf1.transpose().sort_index(),
          )
  
          self.assert_eq(
              pdf2.transpose().sort_index(),
              psdf2.transpose().sort_index(),
          )
  
      pdf3 = pd.DataFrame(
          {
              ("cg1", "a"): [1, 2, 3],
              ("cg1", "b"): [4, 5, 6],
              ("cg2", "c"): [7, 8, 9],
              ("cg3", "d"): [9, 9, 9],
          },
          index=pd.MultiIndex.from_tuples(
              [("rg1", "x"), ("rg1", "y"), ("rg2", "z")]
          ),
      )
      psdf3 = ps.from_pandas(pdf3)
  
      self.assert_eq(
          pdf3.transpose().sort_index(), psdf3.transpose().sort_index()
      )
  
      with option_context("compute.max_rows", None):
          self.assert_eq(
              pdf3.transpose().sort_index(),
              psdf3.transpose().sort_index(),
          )
  
imports: import unittest
  import numpy
  import pandas
  from pyspark import pandas
  from pyspark.pandas.config import option_context
  from pyspark.testing.pandasutils import ComparisonTestBase
  from pyspark.testing.sqlutils import SQLTestUtils
label_desc: Use image node_id 10 for calling the FrameReshapingMixin obj's underlying member method code with example usage: obj.test_transpose() without return types