class_docstr: Various Series and DataFrame methods.
class_docstr_tok: ["Various","Series","and","DataFrame","methods","."]
code: def test_value_counts(self, all_data, dropna):
      all_data = all_data[:10]
      if dropna:
          other = all_data[~all_data.isna()]
      else:
          other = all_data
  
      result = (
          pd.Series(all_data).value_counts(dropna=dropna).sort_index()
      )
      expected = (
          pd.Series(other).value_counts(dropna=dropna).sort_index()
      )
  
      tm.assert_series_equal(result, expected)
  
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 3 for calling the BaseMethodsTests obj's underlying member method code with example usage: obj.test_value_counts(all_data, dropna) without return types