code: def test_ascending_groupby_non_numeric(df):
      """Test output for non-numeric column"""
      expected = (
          df.groupby("result", sort=False)
          .apply(lambda d: d.sort_values("major").head(2))
          .droplevel(0)
      )
      assert_frame_equal(
          df.groupby_topk("result", "major", 2, ignore_index=False),
          expected,
      )
  
file_path: pyjanitor/tests/functions/test_groupby_topk.py
imports: import pandas
  import pytest
  from pandas.testing import assert_frame_equal
label_desc: Use image node_id 4 for calling a global function with example usage: test_ascending_groupby_non_numeric(df) without return types