QST: How to solve the problem KeyError: "['Label'] not found in axis" ??
I am working on network traffic classification using tf.keras. i want to drop a column name Label and set Label as Y and all other columns in X.  I am using pandas.  here is the code line:
**df =df.drop(['Label'], axis=1, inplace=True)**

I am getting the following error:
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-41-6e2d6c1eb80d> in <module>()
----> 1 df =df.drop(['Label'], axis=1, inplace=True)

3 frames
/usr/local/lib/python3.6/dist-packages/pandas/core/indexes/base.py in drop(self, labels, errors)
   5285         if mask.any():
   5286             if errors != "ignore":
-> 5287                 raise KeyError(f"{labels[mask]} not found in axis")
   5288             indexer = indexer[~mask]
   5289         return self.delete(indexer)

**KeyError: "['Label'] not found in axis**"

I am trying different methods but failed. anyone of you kindly help to get rid of this situation. 
