code: def test_astype_from_categorical3(self):
      df = DataFrame(
          {"cats": [1, 2, 3, 4, 5, 6], "vals": [1, 2, 3, 4, 5, 6]}
      )
      cats = Categorical([1, 2, 3, 4, 5, 6])
      exp_df = DataFrame({"cats": cats, "vals": [1, 2, 3, 4, 5, 6]})
      df["cats"] = df["cats"].astype("category")
      tm.assert_frame_equal(exp_df, df)
  
imports: import re
  import numpy
  import pytest
  import pandas.util._test_decorators
  import pandas
  from pandas import Categorical, CategoricalDtype, DataFrame, DatetimeTZDtype, Index, Interval, IntervalDtype, NaT, Series, Timedelta, Timestamp, concat, date_range, option_context
  import pandas._testing
label_desc: Use image node_id 1 for calling the TestAstypeCategorical obj's underlying member method code with example usage: obj.test_astype_from_categorical3() without return types