In [1]:
import pandas as pd
df = pd.DataFrame([['AA', 1],['BB', 2],['CC', 3]], columns = ['name','value'])
In [2]:
df
Out[2]:
In [3]:
df.drop('value', axis=1, inplace=True)
In [4]:
df
Out[4]:
In [5]:
df = pd.DataFrame([['AA', 1],['BB', 2],['CC', 3]], columns = ['name','value'])
In [6]:
df
Out[6]:
In [7]:
values = df.pop('value')
In [8]:
df
Out[8]:
In [9]:
values
Out[9]:
In [ ]: