code: def test_mean_dont_convert_j_to_complex():
      # GH#36703
      df = pd.DataFrame([{"db": "J", "numeric": 123}])
      msg = r"Could not convert \['J'\] to numeric|does not support"
      with pytest.raises(TypeError, match=msg):
          df.mean()
  
      with pytest.raises(TypeError, match=msg):
          df.agg("mean")
  
      msg = "Could not convert string 'J' to numeric|does not support"
      with pytest.raises(TypeError, match=msg):
          df["db"].mean()
      msg = "Could not convert string 'J' to numeric|ufunc 'divide'"
      with pytest.raises(TypeError, match=msg):
          np.mean(df["db"].astype("string").array)
  
file_path: pandas/pandas/tests/series/test_reductions.py
imports: import numpy
  import pytest
  import pandas
  from pandas import Series
  import pandas._testing
label_desc: Use image node_id 14 for calling a global function with example usage: test_mean_dont_convert_j_to_complex() without return types