class_docstr: Various Series and DataFrame methods.
class_docstr_tok: ["Various","Series","and","DataFrame","methods","."]
code: def test_argmin_argmax(
      self, data_for_sorting, data_missing_for_sorting, na_value
  ):
      # GH 24382
      is_bool = data_for_sorting.dtype._is_boolean
  
      exp_argmax = 1
      exp_argmax_repeated = 3
      if is_bool:
          # See data_for_sorting docstring
          exp_argmax = 0
          exp_argmax_repeated = 1
  
      # data_for_sorting -> [B, C, A] with A < B < C
      assert data_for_sorting.argmax() == exp_argmax
      assert data_for_sorting.argmin() == 2
  
      # with repeated values -> first occurrence
      data = data_for_sorting.take([2, 0, 0, 1, 1, 2])
      assert data.argmax() == exp_argmax_repeated
      assert data.argmin() == 0
  
      # with missing values
      # data_missing_for_sorting -> [B, NA, A] with A < B and NA missing.
      assert data_missing_for_sorting.argmax() == 0
      assert data_missing_for_sorting.argmin() == 2
  
imports: import inspect
  import operator
  import numpy
  import pytest
  from pandas._typing import Dtype
  from pandas.core.dtypes.common import is_bool_dtype
  from pandas.core.dtypes.dtypes import NumpyEADtype
  from pandas.core.dtypes.missing import na_value_for_dtype
  import pandas
  import pandas._testing
  from pandas.core.sorting import nargsort
label_desc: Use image node_id 12 for calling the BaseMethodsTests obj's underlying member method code with example usage: obj.test_argmin_argmax(data_for_sorting, data_missing_for_sorting, na_value) without return types