code: def test_transform_column(dataframe, elementwise):
      """
      Test replacing data of the original column.
  
      The function that is used for testing here
      must be able to operate elementwise
      and on a single pandas Series.
      We use np.log10 as an example
      """
      df = dataframe.transform_column(
          "a", np.log10, elementwise=elementwise
      )
      expected = pd.Series(np.log10([1, 2, 3] * 3))
      expected.name = "a"
      assert_series_equal(df["a"], expected)
  
file_path: pyjanitor/tests/functions/test_transform_column.py
imports: import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_transform_column(dataframe, elementwise) without return types