code: def test_dropna(self):
      pdf = pd.DataFrame(
          {
              "A": [None, 1, None, 1, 2],
              "B": [1, 2, 3, None, None],
              "C": [4, 5, 6, 7, None],
          }
      )
      psdf = ps.from_pandas(pdf)
  
      for dropna in [True, False]:
          for as_index in [True, False]:
              if as_index:
  
                  def sort(df):
                      return df.sort_index()
  
              else:
  
                  def sort(df):
                      return df.sort_values("A").reset_index(drop=True)
  
              self.assert_eq(
                  sort(
                      psdf.groupby(
                          "A", as_index=as_index, dropna=dropna
                      ).std()
                  ),
                  sort(
                      pdf.groupby(
                          "A", as_index=as_index, dropna=dropna
                      ).std()
                  ),
              )
  
              self.assert_eq(
                  sort(
                      psdf.groupby(
                          "A", as_index=as_index, dropna=dropna
                      ).B.std()
                  ),
                  sort(
                      pdf.groupby(
                          "A", as_index=as_index, dropna=dropna
                      ).B.std()
                  ),
              )
              self.assert_eq(
                  sort(
                      psdf.groupby(
                          "A", as_index=as_index, dropna=dropna
                      )["B"].std()
                  ),
                  sort(
                      pdf.groupby(
                          "A", as_index=as_index, dropna=dropna
                      )["B"].std()
                  ),
              )
  
              self.assert_eq(
                  sort(
                      psdf.groupby(
                          "A", as_index=as_index, dropna=dropna
                      ).agg({"B": "min", "C": "std"})
                  ),
                  sort(
                      pdf.groupby(
                          "A", as_index=as_index, dropna=dropna
                      ).agg({"B": "min", "C": "std"})
                  ),
              )
  
      for dropna in [True, False]:
          for as_index in [True, False]:
              if as_index:
  
                  def sort(df):
                      return df.sort_index()
  
              else:
  
                  def sort(df):
                      return df.sort_values(["A", "B"]).reset_index(
                          drop=True
                      )
  
              self.assert_eq(
                  sort(
                      psdf.groupby(
                          ["A", "B"], as_index=as_index, dropna=dropna
                      ).agg({"C": ["min", "std"]})
                  ),
                  sort(
                      pdf.groupby(
                          ["A", "B"], as_index=as_index, dropna=dropna
                      ).agg({"C": ["min", "std"]})
                  ),
                  almost=True,
              )
  
      # multi-index columns
      columns = pd.MultiIndex.from_tuples(
          [("X", "A"), ("X", "B"), ("Y", "C")]
      )
      pdf.columns = columns
      psdf.columns = columns
  
      for dropna in [True, False]:
          for as_index in [True, False]:
              if as_index:
  
                  def sort(df):
                      return df.sort_index()
  
              else:
  
                  def sort(df):
                      return df.sort_values(("X", "A")).reset_index(
                          drop=True
                      )
  
              sorted_stats_psdf = sort(
                  psdf.groupby(
                      ("X", "A"), as_index=as_index, dropna=dropna
                  ).agg({("X", "B"): "min", ("Y", "C"): "std"})
              )
              sorted_stats_pdf = sort(
                  pdf.groupby(
                      ("X", "A"), as_index=as_index, dropna=dropna
                  ).agg({("X", "B"): "min", ("Y", "C"): "std"})
              )
              self.assert_eq(sorted_stats_psdf, sorted_stats_pdf)
  
file_path: spark/python/pyspark/pandas/tests/groupby/test_missing_data.py
imports: import unittest
  import numpy
  import pandas
  from pyspark import pandas
  from pyspark.testing.pandasutils import ComparisonTestBase
  from pyspark.testing.sqlutils import SQLTestUtils
label_desc: Use image node_id 4 for calling the GroupbyMissingDataMixin obj's underlying member method code with example usage: obj.test_dropna() and returns: df, df, df, df, df, df