This is a pandas question.
Try to copy this in Jupyter Notebook:
In [1]: df = pd.DataFrame([[1, 2], [4, 5], [7, 8]],
index=['cobra', 'viper', 'sidewinder'],
columns=['max_speed', 'shield'])
df
In [2]: df.pop('shield') # Return as series.
In [3]: pd.DataFrame(df.pop('shield')) # Return as DataFrame.
Then inverse it to the sequence of
In[1]
In[3]
In[2]
Why the 3rd Out[-] always cause an error?
I oftentimes encounter this kinds of error. Is this a cache issue? Redundancy? What is the reason why such error occurs?