CCIEGZM
CCIEGZM

Reputation: 105

Pandas DataFrame drop row

            total_purchase_amt
2013-07-01            22533121
2013-07-02            29624840
2013-07-03            22525940
2013-07-04            32111643
...                        ...

I need to drop the 2 row (2013-07-02 29624840),How can I do that?

Upvotes: 0

Views: 247

Answers (1)

Zero
Zero

Reputation: 76917

Use drop method

In [8]: df.drop(['2013-07-02'])
Out[8]:
            total_purchase_amt
2013-07-01            22533121
2013-07-03            22525940
2013-07-04            32111643

Here initial df was

In [9]: df
Out[9]:
            total_purchase_amt
2013-07-01            22533121
2013-07-02            29624840
2013-07-03            22525940
2013-07-04            32111643

Upvotes: 1

Related Questions