0

I am new to pandas and I want to filter my column c (that is much longer on my df). I just need to drop the several E99 that are in column b.

df = pd.DataFrame(np.array([[1, 2, 3], [E99, 08A, 13B], [7, 8, 9]]),
                   columns=['a', 'b', 'c'])

This is my dataframe df:

   a  b    c
0  1  E99  3
1  4  08A  6
2  7  13B  9
....

I tried this :

df = df[df["b"] != "E99"] 

but it just doesn't work, with this I have:

df
   a  b  c
0  1  0  3
1  4  1  6
2  7  2  9

Any ideas?

user78910
  • 349
  • 2
  • 12

0 Answers0