Repository: sktime/sktime

Issue:
[BUG] sktime time series classification panel data have duplicate instance indices
**Describe the bug**
If you load arrow_head data with default split settings, the resulting dataframe has indices that repeat. this is because there is a concatenation of train and test data

**To Reproduce**

```python
from sktime.datasets import load_arrow_head
X, y = load_arrow_head(return_X_y=True)
X.index.values
```

Output:
```
array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,
        13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,
        26,  27,  28,  29,  30,  31,  32,  33,  34,  35,   0,   1,   2,
         3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15,
        16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,
        29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,
        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,
        55,  56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,
        68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,
        81,  82,  83,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,
        94,  95,  96,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106,
       107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
       120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
       133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
       146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
       159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
       172, 173, 174])
```


**Expected behavior**
No repetition of indices


**Versions**
<details>
System:
    python: 3.7.9 (default, Aug 31 2020, 07:22:35)  [Clang 10.0.0 ]
executable: /usr/local/Caskroom/miniconda/base/envs/sktime/bin/python
   machine: Darwin-20.5.0-x86_64-i386-64bit

Python dependencies:
          pip: 20.3.3
   setuptools: 51.0.0.post20201207
      sklearn: 0.23.0
       sktime: 0.7.0
  statsmodels: 0.12.1
        numpy: 1.19.4
        scipy: 1.5.4
       Cython: 0.29.17
       pandas: 1.1.5
   matplotlib: 3.3.3
       joblib: 1.0.0
        numba: 0.52.0
     pmdarima: 1.8.0
      tsfresh: 0.17.0
</details>



Discussion:
@fkiraly and I think a possible solution to this is to ensure that the train and test datasets have distinct indices, so that when they are concatenated, we do not get any repeated indices.

Might also need to check other datasets to see if there are similar problems


I think the index is generated automatically when loading the files: https://github.com/alan-turing-institute/sktime/blob/6ee3a7a9e6060b53987dc91335401f02ace3d059/sktime/datasets/_data_io.py#L194

So we could reindex it after loading both the train and test split using something like: `X.reindex(drop=True)`
That's a bad idea, because I think indices in train and test should correspond to indices in the pooled dataset (for traceability/reproducibility).
hm, the problem might be that it has to be fixed upstream in timeseriesclassification.com if we don't do reindexing.

Since this does not seem to happen on a realistic time scale, I'd reverse my opinion and think that re-indexing is fine to make indices unique, for now.

Then, once timeseriesclassification.com fixes this, we can still change the loader.
The same problem seems to be occurring in load_basic_motions too.

Resolving patch:
diff --git a/sktime/datasets/_data_io.py b/sktime/datasets/_data_io.py
--- a/sktime/datasets/_data_io.py
+++ b/sktime/datasets/_data_io.py
@@ -176,6 +176,7 @@ def _load_dataset(name, split, return_X_y, extract_path=None):
             result = load_from_tsfile_to_dataframe(abspath)
             X = pd.concat([X, pd.DataFrame(result[0])])
             y = pd.concat([y, pd.Series(result[1])])
+        X = X.reset_index(drop=True)
         y = pd.Series.to_numpy(y, dtype=str)
     else:
         raise ValueError("Invalid `split` value =", split)
@@ -219,6 +220,7 @@ def _load_provided_dataset(name, split=None, return_X_y=True, return_type=None):
             X = np.concatenate((X_train, X_test))
         elif isinstance(X_train, pd.DataFrame):
             X = pd.concat([X_train, X_test])
+            X = X.reset_index(drop=True)
         else:
             raise IOError(
                 f"Invalid data structure type {type(X_train)} for loading "


Test patch: