code: def test_frame_init_df_series(self):
      # initialization by dataframe and no-named series
      df = pd.DataFrame(
          {"A": [1, 2, 3], "B": [4, 5, 6], "C": [7, 8, 9]},
          index=["a", "b", "c"],
          columns=["A", "B", "C"],
      )
      s = pd.Series([1, 2, 3], index=["a", "b", "c"], name=".target")
  
      mdf = pdml.ModelFrame(df, target=s)
      self.assertIsInstance(mdf, pdml.ModelFrame)
      self.assertEqual(mdf.shape, (3, 4))
      tm.assert_index_equal(mdf.index, pd.Index(["a", "b", "c"]))
      tm.assert_index_equal(
          mdf.columns, pd.Index([".target", "A", "B", "C"])
      )
      tm.assert_frame_equal(mdf.data, df)
      tm.assert_series_equal(mdf.target, s)
      self.assertEqual(mdf.target.name, ".target")
      self.assertEqual(mdf.target_name, ".target")
  
      s = pd.Series([1, 2, 3])
      with pytest.raises(
          ValueError, match="data and target must have equal index"
      ):
          mdf = pdml.ModelFrame(df, target=s)
  
      s = pd.Series([1, 2, 3], index=["a", "b", "c"], name="XXX")
      mdf = pdml.ModelFrame(df, target=s)
      self.assertIsInstance(mdf, pdml.ModelFrame)
      self.assertEqual(mdf.shape, (3, 4))
      tm.assert_index_equal(mdf.index, pd.Index(["a", "b", "c"]))
      tm.assert_index_equal(
          mdf.columns, pd.Index(["XXX", "A", "B", "C"])
      )
      tm.assert_frame_equal(mdf.data, df)
      tm.assert_series_equal(mdf.target, s)
      self.assertEqual(mdf.target.name, "XXX")
      self.assertEqual(mdf.target_name, "XXX")
  
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 3 for calling the TestModelFrame obj's underlying member method code with example usage: obj.test_frame_init_df_series() without return types