In [1]:
import numpy as np 
from pandas import Series, DataFrame
import pandas as pd

In [5]:
ser1 = Series(np.arange(3), index=['a','b','c'])
ser1


Out[5]:
a    0
b    1
c    2
dtype: int64

In [6]:
ser1.drop('b')


Out[6]:
a    0
c    2
dtype: int64

In [8]:
dframe1 = DataFrame(np.arange(9).reshape((3,3,)), index=['SF', 'LA', 'NY'], columns=['pop', 'size', 'year'] )
dframe1


Out[8]:
pop size year
SF 0 1 2
LA 3 4 5
NY 6 7 8

In [9]:
dframe1.drop('LA')


Out[9]:
pop size year
SF 0 1 2
NY 6 7 8

In [10]:
dframe2 = dframe1.drop('LA')

In [11]:
dframe1.drop('year', axis=1)


Out[11]:
pop size
SF 0 1
LA 3 4
NY 6 7

In [ ]:


In [ ]: