in
6 scoring='accuracy')
7
----> 8 tpot.fit(train.drop('isFraud',axis=1).loc[train].values,
9 train.loc[train,'isFraud'].values)
C:\ProgramData\New folder\lib\site-packages\pandas\core\indexing.py in __getitem__(self, key)
1498
1499 maybe_callable = com.apply_if_callable(key, self.obj)
-> 1500 return self._getitem_axis(maybe_callable, axis=axis)
1501
1502 def _is_scalar_access(self, key):
C:\ProgramData\New folder\lib\site-packages\pandas\core\indexing.py in _getitem_axis(self, key, axis)
1898
1899 if hasattr(key, 'ndim') and key.ndim > 1:
-> 1900 raise ValueError('Cannot index with multidimensional key')
1901
1902 return self._getitem_iterable(key, axis=axis)
**ValueError: Cannot index with multidimensional key**
-----------------------------------------------------------------------------------
What to do if we get this type of issue !!!! Please help !!! Thanks in advance.
I think this issue is related to how to use .loc of pandas.Dataframe. I think the train maybe a multidimensional key. If so, please convert it to a 1D indexer.
ValueError Traceback (most recent call last)