code: def test_drop(self):
      pdf = pd.DataFrame(
          {"x": [1, 2], "y": [3, 4], "z": [5, 6]},
          index=np.random.rand(2),
      )
      psdf = ps.from_pandas(pdf)
  
      # Assert 'labels' or 'columns' parameter is set
      expected_error_message = (
          "Need to specify at least one of 'labels' or 'columns'"
      )
      with self.assertRaisesRegex(ValueError, expected_error_message):
          psdf.drop()
  
      #
      # Drop columns
      #
  
      # Assert using a str for 'labels' works
      self.assert_eq(psdf.drop("x", axis=1), pdf.drop("x", axis=1))
      self.assert_eq(
          (psdf + 1).drop("x", axis=1), (pdf + 1).drop("x", axis=1)
      )
      # Assert using a list for 'labels' works
      self.assert_eq(
          psdf.drop(["y", "z"], axis=1), pdf.drop(["y", "z"], axis=1)
      )
      self.assert_eq(
          psdf.drop(["x", "y", "z"], axis=1),
          pdf.drop(["x", "y", "z"], axis=1),
      )
      # Assert using 'columns' instead of 'labels' produces the same results
      self.assert_eq(psdf.drop(columns="x"), pdf.drop(columns="x"))
      self.assert_eq(
          psdf.drop(columns=["y", "z"]), pdf.drop(columns=["y", "z"])
      )
      self.assert_eq(
          psdf.drop(columns=["x", "y", "z"]),
          pdf.drop(columns=["x", "y", "z"]),
      )
      self.assert_eq(psdf.drop(columns=[]), pdf.drop(columns=[]))
  
      columns = pd.MultiIndex.from_tuples(
          [(1, "x"), (1, "y"), (2, "z")]
      )
      pdf.columns = columns
      psdf = ps.from_pandas(pdf)
  
      self.assert_eq(psdf.drop(columns=1), pdf.drop(columns=1))
      self.assert_eq(
          psdf.drop(columns=(1, "x")), pdf.drop(columns=(1, "x"))
      )
      self.assert_eq(
          psdf.drop(columns=[(1, "x"), 2]),
          pdf.drop(columns=[(1, "x"), 2]),
      )
      self.assert_eq(
          psdf.drop(columns=[(1, "x"), (1, "y"), (2, "z")]),
          pdf.drop(columns=[(1, "x"), (1, "y"), (2, "z")]),
      )
  
      self.assertRaises(KeyError, lambda: psdf.drop(columns=3))
      self.assertRaises(KeyError, lambda: psdf.drop(columns=(1, "z")))
  
      pdf.index = pd.MultiIndex.from_tuples([("i", 0), ("j", 1)])
      psdf = ps.from_pandas(pdf)
      self.assert_eq(
          psdf.drop(columns=[(1, "x"), (1, "y"), (2, "z")]),
          pdf.drop(columns=[(1, "x"), (1, "y"), (2, "z")]),
      )
  
      # non-string names
      pdf = pd.DataFrame(
          {10: [1, 2], 20: [3, 4], 30: [5, 6]}, index=np.random.rand(2)
      )
      psdf = ps.from_pandas(pdf)
  
      self.assert_eq(psdf.drop(10, axis=1), pdf.drop(10, axis=1))
      self.assert_eq(
          psdf.drop([20, 30], axis=1), pdf.drop([20, 30], axis=1)
      )
  
      #
      # Drop rows
      #
  
      pdf = pd.DataFrame(
          {"X": [1, 2, 3], "Y": [4, 5, 6], "Z": [7, 8, 9]},
          index=["A", "B", "C"],
      )
      psdf = ps.from_pandas(pdf)
  
      # Given labels (and axis = 0)
      self.assert_eq(
          psdf.drop(labels="A", axis=0), pdf.drop(labels="A", axis=0)
      )
      self.assert_eq(psdf.drop(labels="A"), pdf.drop(labels="A"))
      self.assert_eq(
          (psdf + 1).drop(labels="A"), (pdf + 1).drop(labels="A")
      )
      self.assert_eq(
          psdf.drop(labels=["A", "C"], axis=0),
          pdf.drop(labels=["A", "C"], axis=0),
      )
      self.assert_eq(
          psdf.drop(labels=["A", "B", "C"], axis=0),
          pdf.drop(labels=["A", "B", "C"], axis=0),
      )
  
      with ps.option_context("compute.isin_limit", 2):
          self.assert_eq(
              psdf.drop(labels=["A", "B", "C"], axis=0),
              pdf.drop(labels=["A", "B", "C"], axis=0),
          )
  
      # Given index
      self.assert_eq(psdf.drop(index="A"), pdf.drop(index="A"))
      self.assert_eq(
          psdf.drop(index=["A", "C"]), pdf.drop(index=["A", "C"])
      )
      self.assert_eq(
          psdf.drop(index=["A", "B", "C"]),
          pdf.drop(index=["A", "B", "C"]),
      )
      self.assert_eq(psdf.drop(index=[]), pdf.drop(index=[]))
  
      with ps.option_context("compute.isin_limit", 2):
          self.assert_eq(
              psdf.drop(index=["A", "B", "C"]),
              pdf.drop(index=["A", "B", "C"]),
          )
  
      # Non-string names
      pdf.index = [10, 20, 30]
      psdf = ps.from_pandas(pdf)
      self.assert_eq(
          psdf.drop(labels=10, axis=0), pdf.drop(labels=10, axis=0)
      )
      self.assert_eq(
          psdf.drop(labels=[10, 30], axis=0),
          pdf.drop(labels=[10, 30], axis=0),
      )
      self.assert_eq(
          psdf.drop(labels=[10, 20, 30], axis=0),
          pdf.drop(labels=[10, 20, 30], axis=0),
      )
  
      with ps.option_context("compute.isin_limit", 2):
          self.assert_eq(
              psdf.drop(labels=[10, 20, 30], axis=0),
              pdf.drop(labels=[10, 20, 30], axis=0),
          )
  
      # MultiIndex
      pdf.index = pd.MultiIndex.from_tuples(
          [("a", "x"), ("b", "y"), ("c", "z")]
      )
      psdf = ps.from_pandas(pdf)
      self.assertRaises(
          NotImplementedError, lambda: psdf.drop(labels=[("a", "x")])
      )
  
      #
      # Drop rows and columns
      #
      pdf = pd.DataFrame(
          {"X": [1, 2, 3], "Y": [4, 5, 6], "Z": [7, 8, 9]},
          index=["A", "B", "C"],
      )
      psdf = ps.from_pandas(pdf)
      self.assert_eq(
          psdf.drop(index="A", columns="X"),
          pdf.drop(index="A", columns="X"),
      )
      self.assert_eq(
          psdf.drop(index=["A", "C"], columns=["X", "Z"]),
          pdf.drop(index=["A", "C"], columns=["X", "Z"]),
      )
      self.assert_eq(
          psdf.drop(index=["A", "B", "C"], columns=["X", "Z"]),
          pdf.drop(index=["A", "B", "C"], columns=["X", "Z"]),
      )
      with ps.option_context("compute.isin_limit", 2):
          self.assert_eq(
              psdf.drop(index=["A", "B", "C"], columns=["X", "Z"]),
              pdf.drop(index=["A", "B", "C"], columns=["X", "Z"]),
          )
      self.assert_eq(
          psdf.drop(index=[], columns=["X", "Z"]),
          pdf.drop(index=[], columns=["X", "Z"]),
      )
      self.assert_eq(
          psdf.drop(index=["A", "B", "C"], columns=[]),
          pdf.drop(index=["A", "B", "C"], columns=[]),
      )
      self.assert_eq(
          psdf.drop(index=[], columns=[]),
          pdf.drop(index=[], columns=[]),
      )
      self.assertRaises(
          ValueError,
          lambda: psdf.drop(labels="A", axis=0, columns="X"),
      )
  
imports: import unittest
  import numpy
  import pandas
  from pandas.tseries.offsets import DateOffset
  from pyspark import pandas
  from pyspark.errors import PySparkValueError
  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 5 for calling the FrameReindexingMixin obj's underlying member method code with example usage: obj.test_drop() without return types