prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [BUG] sktime.datatypes._panel._examples raises pandas.core.common.SettingWithCopyError
  **Describe the bug**
  Attempting to install [tsai](https://pypi.org/project/tsai/) as an upstream package also installs this package, but the install raises an error that traces to line 67 in "/opt/conda/lib/python3.8/site-packages/sktime/datatypes/_panel/_examples.py"
  ```
      X.iloc[0][0] = pd.Series([1, 2, 3])
  ```
  
  **To Reproduce**
  Importing any code that executes the code starting at line 67 of /sktime/datatypes/_panel/_examples.py can raise a Pandas error, depending on Pandas version that may be installed
  
  **Expected behavior**
  No error should be raised on install or import of sktime as a dependency. 
  
  **Additional context**
  <!--
  Add any other context about the problem here.
  -->
  
  **Versions**
  System:
      python: 3.9.1 (default, Sep 16 2021, 11:42:30)  [Clang 12.0.5 (clang-1205.0.22.11)]
  executable: /.../.pyenv/versions/3.9.1/bin/python
     machine: macOS-11.6-x86_64-i386-64bit
  
  Python dependencies:
            pip: 21.2.4
     setuptools: 49.2.1
        sklearn: 1.0
         sktime: 0.8.0
    statsmodels: 0.12.2
          numpy: 1.20.3
          scipy: 1.7.1
         Cython: None
         pandas: 1.3.3
     matplotlib: 3.4.3
         joblib: 1.0.1
          numba: 0.53.1
       pmdarima: None
        tsfresh: 0.18.0
  
  </issue>
  <code>
  [start of sktime/datatypes/_panel/_examples.py]
  1 # -*- coding: utf-8 -*-
  2 """Example generation for testing.
  3 
  4 Exports dict of examples, useful for testing as fixtures.
  5 
  6 example_dict: dict indexed by triple
  7   1st element = mtype - str
  8   2nd element = considered as this scitype - str
  9   3rd element = int - index of example
  10 elements are data objects, considered examples for the mtype
  11     all examples with same index are considered "same" on scitype content
  12     if None, indicates that representation is not possible
  13 
  14 example_lossy: dict of bool indexed by pairs of str
  15   1st element = mtype - str
  16   2nd element = considered as this scitype - str
  17   3rd element = int - index of example
  18 elements are bool, indicate whether representation has information removed
  19     all examples with same index are considered "same" on scitype content
  20 
  21 overall, conversions from non-lossy representations to any other ones
  22     should yield the element exactly, identidally (given same index)
  23 """
  24 
  25 import pandas as pd
  26 import numpy as np
  27 
  28 example_dict = dict()
  29 example_dict_lossy = dict()
  30 
  31 ###
  32 
  33 
  34 X = np.array(
  35     [[[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 55, 6]], [[1, 2, 3], [42, 5, 6]]],
  36     dtype=np.int64,
  37 )
  38 
  39 example_dict[("numpy3D", "Panel", 0)] = X
  40 example_dict_lossy[("numpy3D", "Panel", 0)] = False
  41 
  42 cols = [f"var_{i}" for i in range(2)]
  43 Xlist = [
  44     pd.DataFrame([[1, 4], [2, 5], [3, 6]], columns=cols),
  45     pd.DataFrame([[1, 4], [2, 55], [3, 6]], columns=cols),
  46     pd.DataFrame([[1, 42], [2, 5], [3, 6]], columns=cols),
  47 ]
  48 
  49 example_dict[("df-list", "Panel", 0)] = Xlist
  50 example_dict_lossy[("df-list", "Panel", 0)] = False
  51 
  52 cols = ["instances", "timepoints"] + [f"var_{i}" for i in range(2)]
  53 
  54 Xlist = [
  55     pd.DataFrame([[0, 0, 1, 4], [0, 1, 2, 5], [0, 2, 3, 6]], columns=cols),
  56     pd.DataFrame([[1, 0, 1, 4], [1, 1, 2, 55], [1, 2, 3, 6]], columns=cols),
  57     pd.DataFrame([[2, 0, 1, 42], [2, 1, 2, 5], [2, 2, 3, 6]], columns=cols),
  58 ]
  59 X = pd.concat(Xlist)
  60 X = X.set_index(["instances", "timepoints"])
  61 
  62 example_dict[("pd-multiindex", "Panel", 0)] = X
  63 example_dict_lossy[("pd-multiindex", "Panel", 0)] = False
  64 
  65 cols = [f"var_{i}" for i in range(2)]
  66 X = pd.DataFrame(columns=cols, index=[0, 1, 2])
  67 X.iloc[0][0] = pd.Series([1, 2, 3])
  68 X.iloc[0][1] = pd.Series([4, 5, 6])
  69 X.iloc[1][0] = pd.Series([1, 2, 3])
  70 X.iloc[1][1] = pd.Series([4, 55, 6])
  71 X.iloc[2][0] = pd.Series([1, 2, 3])
  72 X.iloc[2][1] = pd.Series([42, 5, 6])
  73 
  74 example_dict[("nested_univ", "Panel", 0)] = X
  75 example_dict_lossy[("nested_univ", "Panel", 0)] = False
  76
  [end of sktime/datatypes/_panel/_examples.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/sktime/datatypes/_panel/_examples.py b/sktime/datatypes/_panel/_examples.py
  --- a/sktime/datatypes/_panel/_examples.py
  +++ b/sktime/datatypes/_panel/_examples.py
  @@ -64,12 +64,13 @@
   
   cols = [f"var_{i}" for i in range(2)]
   X = pd.DataFrame(columns=cols, index=[0, 1, 2])
  -X.iloc[0][0] = pd.Series([1, 2, 3])
  -X.iloc[0][1] = pd.Series([4, 5, 6])
  -X.iloc[1][0] = pd.Series([1, 2, 3])
  -X.iloc[1][1] = pd.Series([4, 55, 6])
  -X.iloc[2][0] = pd.Series([1, 2, 3])
  -X.iloc[2][1] = pd.Series([42, 5, 6])
  +X["var_0"] = pd.Series(
  +    [pd.Series([1, 2, 3]), pd.Series([1, 2, 3]), pd.Series([1, 2, 3])]
  +)
  +
  +X["var_1"] = pd.Series(
  +    [pd.Series([4, 5, 6]), pd.Series([4, 55, 6]), pd.Series([42, 5, 6])]
  +)
   
   example_dict[("nested_univ", "Panel", 0)] = X
   example_dict_lossy[("nested_univ", "Panel", 0)] = False
  
verification_info: {"golden_diff": "diff --git a/sktime/datatypes/_panel/_examples.py b/sktime/datatypes/_panel/_examples.py\n--- a/sktime/datatypes/_panel/_examples.py\n+++ b/sktime/datatypes/_panel/_examples.py\n@@ -64,12 +64,13 @@\n \n cols = [f\"var_{i}\" for i in range(2)]\n X = pd.DataFrame(columns=cols, index=[0, 1, 2])\n-X.iloc[0][0] = pd.Series([1, 2, 3])\n-X.iloc[0][1] = pd.Series([4, 5, 6])\n-X.iloc[1][0] = pd.Series([1, 2, 3])\n-X.iloc[1][1] = pd.Series([4, 55, 6])\n-X.iloc[2][0] = pd.Series([1, 2, 3])\n-X.iloc[2][1] = pd.Series([42, 5, 6])\n+X[\"var_0\"] = pd.Series(\n+    [pd.Series([1, 2, 3]), pd.Series([1, 2, 3]), pd.Series([1, 2, 3])]\n+)\n+\n+X[\"var_1\"] = pd.Series(\n+    [pd.Series([4, 5, 6]), pd.Series([4, 55, 6]), pd.Series([42, 5, 6])]\n+)\n \n example_dict[(\"nested_univ\", \"Panel\", 0)] = X\n example_dict_lossy[(\"nested_univ\", \"Panel\", 0)] = False\n", "issue": "[BUG] sktime.datatypes._panel._examples raises pandas.core.common.SettingWithCopyError\n**Describe the bug**\r\nAttempting to install [tsai](https://pypi.org/project/tsai/) as an upstream package also installs this package, but the install raises an error that traces to line 67 in \"/opt/conda/lib/python3.8/site-packages/sktime/datatypes/_panel/_examples.py\"\r\n```\r\n    X.iloc[0][0] = pd.Series([1, 2, 3])\r\n```\r\n\r\n**To Reproduce**\r\nImporting any code that executes the code starting at line 67 of /sktime/datatypes/_panel/_examples.py can raise a Pandas error, depending on Pandas version that may be installed\r\n\r\n**Expected behavior**\r\nNo error should be raised on install or import of sktime as a dependency. \r\n\r\n**Additional context**\r\n<!--\r\nAdd any other context about the problem here.\r\n-->\r\n\r\n**Versions**\r\nSystem:\r\n    python: 3.9.1 (default, Sep 16 2021, 11:42:30)  [Clang 12.0.5 (clang-1205.0.22.11)]\r\nexecutable: /.../.pyenv/versions/3.9.1/bin/python\r\n   machine: macOS-11.6-x86_64-i386-64bit\r\n\r\nPython dependencies:\r\n          pip: 21.2.4\r\n   setuptools: 49.2.1\r\n      sklearn: 1.0\r\n       sktime: 0.8.0\r\n  statsmodels: 0.12.2\r\n        numpy: 1.20.3\r\n        scipy: 1.7.1\r\n       Cython: None\r\n       pandas: 1.3.3\r\n   matplotlib: 3.4.3\r\n       joblib: 1.0.1\r\n        numba: 0.53.1\r\n     pmdarima: None\r\n      tsfresh: 0.18.0\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"Example generation for testing.\n\nExports dict of examples, useful for testing as fixtures.\n\nexample_dict: dict indexed by triple\n  1st element = mtype - str\n  2nd element = considered as this scitype - str\n  3rd element = int - index of example\nelements are data objects, considered examples for the mtype\n    all examples with same index are considered \"same\" on scitype content\n    if None, indicates that representation is not possible\n\nexample_lossy: dict of bool indexed by pairs of str\n  1st element = mtype - str\n  2nd element = considered as this scitype - str\n  3rd element = int - index of example\nelements are bool, indicate whether representation has information removed\n    all examples with same index are considered \"same\" on scitype content\n\noverall, conversions from non-lossy representations to any other ones\n    should yield the element exactly, identidally (given same index)\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\n\nexample_dict = dict()\nexample_dict_lossy = dict()\n\n###\n\n\nX = np.array(\n    [[[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 55, 6]], [[1, 2, 3], [42, 5, 6]]],\n    dtype=np.int64,\n)\n\nexample_dict[(\"numpy3D\", \"Panel\", 0)] = X\nexample_dict_lossy[(\"numpy3D\", \"Panel\", 0)] = False\n\ncols = [f\"var_{i}\" for i in range(2)]\nXlist = [\n    pd.DataFrame([[1, 4], [2, 5], [3, 6]], columns=cols),\n    pd.DataFrame([[1, 4], [2, 55], [3, 6]], columns=cols),\n    pd.DataFrame([[1, 42], [2, 5], [3, 6]], columns=cols),\n]\n\nexample_dict[(\"df-list\", \"Panel\", 0)] = Xlist\nexample_dict_lossy[(\"df-list\", \"Panel\", 0)] = False\n\ncols = [\"instances\", \"timepoints\"] + [f\"var_{i}\" for i in range(2)]\n\nXlist = [\n    pd.DataFrame([[0, 0, 1, 4], [0, 1, 2, 5], [0, 2, 3, 6]], columns=cols),\n    pd.DataFrame([[1, 0, 1, 4], [1, 1, 2, 55], [1, 2, 3, 6]], columns=cols),\n    pd.DataFrame([[2, 0, 1, 42], [2, 1, 2, 5], [2, 2, 3, 6]], columns=cols),\n]\nX = pd.concat(Xlist)\nX = X.set_index([\"instances\", \"timepoints\"])\n\nexample_dict[(\"pd-multiindex\", \"Panel\", 0)] = X\nexample_dict_lossy[(\"pd-multiindex\", \"Panel\", 0)] = False\n\ncols = [f\"var_{i}\" for i in range(2)]\nX = pd.DataFrame(columns=cols, index=[0, 1, 2])\nX.iloc[0][0] = pd.Series([1, 2, 3])\nX.iloc[0][1] = pd.Series([4, 5, 6])\nX.iloc[1][0] = pd.Series([1, 2, 3])\nX.iloc[1][1] = pd.Series([4, 55, 6])\nX.iloc[2][0] = pd.Series([1, 2, 3])\nX.iloc[2][1] = pd.Series([42, 5, 6])\n\nexample_dict[(\"nested_univ\", \"Panel\", 0)] = X\nexample_dict_lossy[(\"nested_univ\", \"Panel\", 0)] = False\n", "path": "sktime/datatypes/_panel/_examples.py"}]}