0

I have a dataframe as "myDF":

      A          B    C    D
index               
a   Cranes      3.5   2   yes
b   Cranes      4.0   4   yes
c   plovers     1.5   3   no
d   spoonbills  NaN   4   yes
e   spoonbills  6.0   3   no
f   Cranes      3.0   4   no
g   plovers     5.5   2   no
h   Cranes      NaN   2   yes
i   spoonbills  8.0   3   no
j   spoonbills  4.0   2   no
k   parrot      5.0   3   no

I want to delete the last row with index 'k'

I am trying this:

myDF.drop(['k'])

Referring this link

The row is not getting deleted from my dataFrame.

I just started learning python. Can someone please point out what wrong I am doing here?

Naveen Yadav
  • 203
  • 9
  • 25

0 Answers0