code: def test_frame_target_object_set(self):
      df = pd.DataFrame(
          {
              datetime.datetime(2014, 1, 1): [1, 2, 3],
              datetime.datetime(2015, 1, 1): [4, 5, 6],
              datetime.datetime(2016, 1, 1): [7, 8, 9],
          },
          index=["a", "b", "c"],
      )
      mdf = pdml.ModelFrame(df)
  
      mdf.target = pd.Series(
          ["A", "B", "C"], index=["a", "b", "c"], name=5
      )
      self.assertIsInstance(mdf, pdml.ModelFrame)
      self.assertEqual(mdf.shape, (3, 4))
      tm.assert_index_equal(mdf.index, pd.Index(["a", "b", "c"]))
      expected = pd.Index(
          [
              5,
              datetime.datetime(2014, 1, 1),
              datetime.datetime(2015, 1, 1),
              datetime.datetime(2016, 1, 1),
          ]
      )
      tm.assert_index_equal(mdf.columns, expected)
      tm.assert_frame_equal(mdf.data, df)
      expected = pd.Series(
          ["A", "B", "C"], index=["a", "b", "c"], name=5
      )
      tm.assert_series_equal(mdf.target, expected)
      self.assertEqual(mdf.target.name, 5)
  
      # name will be ignored if ModelFrame already has a target
      mdf.target = pd.Series(
          [10, 11, 12], index=["a", "b", "c"], name="X"
      )
      self.assertIsInstance(mdf, pdml.ModelFrame)
      self.assertEqual(mdf.shape, (3, 4))
      tm.assert_index_equal(mdf.index, pd.Index(["a", "b", "c"]))
      expected = pd.Index(
          [
              5,
              datetime.datetime(2014, 1, 1),
              datetime.datetime(2015, 1, 1),
              datetime.datetime(2016, 1, 1),
          ]
      )
      tm.assert_index_equal(mdf.columns, expected)
      tm.assert_frame_equal(mdf.data, df)
      expected = pd.Series([10, 11, 12], index=["a", "b", "c"], name=5)
      tm.assert_series_equal(mdf.target, expected)
      self.assertEqual(mdf.target.name, 5)
  
imports: import pytest
  import datetime
  import warnings
  import numpy
  import pandas
  import sklearn.datasets
  import sklearn.svm
  import pandas_ml
  import pandas_ml.util.testing
label_desc: Use image node_id 17 for calling the TestModelFrame obj's underlying member method code with example usage: obj.test_frame_target_object_set() without return types