code: def test_series_to_frame(self):
      s = pdml.ModelSeries([1, 2, 3, 4, 5])
      self.assertIsInstance(s, pdml.ModelSeries)
  
      df = s.to_frame()
      self.assertIsInstance(df, pdml.ModelFrame)
      tm.assert_index_equal(df.columns, pd.Index([0]))
  
      df = s.to_frame(name="x")
      self.assertIsInstance(df, pdml.ModelFrame)
      tm.assert_index_equal(df.columns, pd.Index(["x"]))
  
      s = pdml.ModelSeries([1, 2, 3, 4, 5], name="name")
      self.assertIsInstance(s, pdml.ModelSeries)
  
      df = s.to_frame()
      self.assertIsInstance(df, pdml.ModelFrame)
      tm.assert_index_equal(df.columns, pd.Index(["name"]))
  
      df = s.to_frame(name="x")
      self.assertIsInstance(df, pdml.ModelFrame)
      tm.assert_index_equal(df.columns, pd.Index(["x"]))
  
file_path: pandas-ml/pandas_ml/test/test_series.py
imports: import numpy
  import pandas
  import sklearn.preprocessing
  import pandas_ml
  import pandas_ml.util.testing
label_desc: Use image node_id 2 for calling the TestModelSeries obj's underlying member method code with example usage: obj.test_series_to_frame() without return types