total_purchase_amt
2013-07-01 22533121
2013-07-02 29624840
2013-07-03 22525940
2013-07-04 32111643
... ...
我需要删除2行(2013-07-02 29624840)
,我该怎么做?
答案 0 :(得分:1)
使用drop
方法
In [8]: df.drop(['2013-07-02'])
Out[8]:
total_purchase_amt
2013-07-01 22533121
2013-07-03 22525940
2013-07-04 32111643
这里的初始df
是
In [9]: df
Out[9]:
total_purchase_amt
2013-07-01 22533121
2013-07-02 29624840
2013-07-03 22525940
2013-07-04 32111643